Documentation ¶
Overview ¶
Package client offers utility functions for service registration
Index ¶
- func ErrorMsg(res *http.Response) string
- func NewHTTPClient(serverEndpoint string, ticket *obtainer.Client) (*httpClient, error)
- func RegisterService(endpoint string, service catalog.Service, ticket *obtainer.Client) (*catalog.Service, error)
- func RegisterServiceAndKeepalive(endpoint string, service catalog.Service, ticket *obtainer.Client) (func() error, func(catalog.Service), error)
- func UnregisterService(endpoint string, service catalog.Service, ticket *obtainer.Client) error
- type FilterArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
NewHTTPClient creates a new HTTP client for SC's REST API
func RegisterService ¶
func RegisterService(endpoint string, service catalog.Service, ticket *obtainer.Client) (*catalog.Service, error)
RegisterService registers service into a catalog
func RegisterServiceAndKeepalive ¶
func RegisterServiceAndKeepalive(endpoint string, service catalog.Service, ticket *obtainer.Client) (func() error, func(catalog.Service), error)
RegisterServiceAndKeepalive registers a service into a catalog and continuously updates it in order to avoid expiry endpoint: catalog endpoint. service: service registration ticket: set to nil for no auth It returns a function for stopping the keepalive and another function for updating the service in keepalive routine
Types ¶
type FilterArgs ¶
type FilterArgs struct {
Path, Op, Value string
}
Click to show internal directories.
Click to hide internal directories.