### File

`src/app/controller/shared/controller.service.ts`

### Extends

`HelixService`

### Index

###### Methods
Public get Public can Protected delete Protected errorHandler Protected getHeaders Protected getHelixKey Protected post Protected put Protected request

### Methods

Public get
`get(clusterName: string)`
Defined in src/app/controller/shared/controller.service.ts:9
Parameters :
Name | Type | Optional
clusterName | `string` | No
Returns : `any`

Public can
`can()`
Inherited from `HelixService`
Defined in `HelixService:14`
Returns : `Observable<any>`

Protected delete
`delete(path: string)`
Inherited from `HelixService`
Defined in `HelixService:48`
Parameters :
Name | Type | Optional
path | `string` | No
Returns : `Observable<any>`

Protected errorHandler
`errorHandler(error: any)`
Inherited from `HelixService`
Defined in `HelixService:68`
Parameters :
Name | Type | Optional
error | `any` | No
Returns : `any`

Protected getHeaders
`getHeaders()`
Inherited from `HelixService`
Defined in `HelixService:61`
Returns : `any`

Protected getHelixKey
`getHelixKey()`
Inherited from `HelixService`
Defined in `HelixService:56`
Returns : `string`

Protected post
`post(path: string, data: any)`
Inherited from `HelixService`
Defined in `HelixService:32`
Parameters :
Name | Type | Optional
path | `string` | No
data | `any` | No
Returns : `Observable<any>`

Protected put
`put(path: string, data: string)`
Inherited from `HelixService`
Defined in `HelixService:40`
Parameters :
Name | Type | Optional
path | `string` | No
data | `string` | No
Returns : `Observable<any>`

Protected request
`request(path: string, helix?: string)`
Inherited from `HelixService`
Defined in `HelixService:20`
Parameters :
Name | Type | Optional
path | `string` | No
helix | `string` | Yes
Returns : `Observable<any>`

    import { Injectable } from '@angular/core';
    import { map } from 'rxjs/operators';

    import { HelixService } from '../../core/helix.service';
    import { Controller } from './controller.model';

    @Injectable()
    export class ControllerService extends HelixService {
      public get(clusterName: string) {
        return this.request(`/clusters/${clusterName}/controller`).pipe(
          map(
            (data) =>
              new Controller(
                data.controller,
                clusterName,
                data.LIVE_INSTANCE,
                data.SESSION_ID,
                data.HELIX_VERSION
              )
          )
        );
      }
    }

# results matching ""

# No results matching ""