Documentation ¶
Index ¶
- Constants
- func GetAPIClient(client *http.Client, endpoint *url.URL, options ...Option) *state.APIClient
- func MustRbfsContext(ctx context.Context) *rbfsContext
- func NewRbfsContext(ctx context.Context, endpointURL *url.URL, elementName string, ...) (*rbfsContext, error)
- func OptionalFloat32(f float32) optional.Float32
- func OptionalFloat64(f float64) optional.Float64
- func OptionalIP(ipAddress net.IP) optional.String
- func OptionalInt(i int) optional.Int
- func OptionalInt32(i int32) optional.Int32
- func OptionalInt64(i int64) optional.Int64
- func OptionalString(s string) optional.String
- type Option
- type RbfsContext
- type RbfsContextOption
- type ServiceName
Constants ¶
View Source
const ( OpsdServiceName = ServiceName("opsd") RestconfdServiceName = ServiceName("restconfd") PrometheusServiceName = ServiceName("prometheus") )
Variables ¶
This section is empty.
Functions ¶
func GetAPIClient ¶
GetAPIClient creates a new API client for the given endpoint.
func MustRbfsContext ¶
MustRbfsContext creates a new RBFS context from the given context.
func NewRbfsContext ¶
func NewRbfsContext(ctx context.Context, endpointURL *url.URL, elementName string, options ...RbfsContextOption) (*rbfsContext, error)
NewRbfsContext creates a new RBFS context from the given context to access an RBFS instance available under the given endpointURL with the specified elementName and the request options.
func OptionalFloat32 ¶
func OptionalFloat64 ¶
func OptionalInt ¶
func OptionalInt32 ¶
func OptionalInt64 ¶
func OptionalString ¶
Types ¶
type Option ¶
type Option func(*state.Configuration)
func DefaultHeader ¶
DefaultHeader returns an option to add a default HTTP header
type RbfsContext ¶
type RbfsContext interface { context.Context // GetServiceEndpoint computes the REST API endpoint for the given service. GetServiceEndpoint(ServiceName) (*url.URL, error) // GetCtrldElementsEndpoint computes the REST API for the elements collection. GetCtrldElementsEndpoint() (*url.URL, error) // GetCtrldElementEndpoint computes the REST API endpoint for the element resource accessible via the given path segments. GetCtrldElementEndpoint(...string) (*url.URL, error) }
RbfsContext provides access to all request-specific settings to invoke the RBFS REST API. It is also a go context that allows cancelling a request.
type RbfsContextOption ¶
RbfsContextOption allows applying an optional RBFS context setting.
func RbfsAccessToken ¶
func RbfsAccessToken(token string) RbfsContextOption
RbfsAccessToken adds an access token the a RBFS context.
type ServiceName ¶
type ServiceName string
Directories ¶
Path | Synopsis |
---|---|
Package alerts contains a client to query RBFS alerts
|
Package alerts contains a client to query RBFS alerts |
Package elements provides access to the element informations.
|
Package elements provides access to the element informations. |
Package metrics contains a client to query RBFS metrics
|
Package metrics contains a client to query RBFS metrics |
* RBFS Operational State API * * This contract describes the RBFS Operational State API contract defined by RBMS, the RtBrick Management System.
|
* RBFS Operational State API * * This contract describes the RBFS Operational State API contract defined by RBMS, the RtBrick Management System. |
Click to show internal directories.
Click to hide internal directories.