client

package
v2.3.4+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2019 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package client offers utility functions for service registration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorMsg

func ErrorMsg(res *http.Response) string

Returns the message field of a resource.Error response

func NewHTTPClient

func NewHTTPClient(serverEndpoint string, ticket *obtainer.Client) (*httpClient, error)

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

func UnregisterService

func UnregisterService(endpoint string, service catalog.Service, ticket *obtainer.Client) error

UnregisterService removes service from a catalog

Types

type FilterArgs

type FilterArgs struct {
	Path, Op, Value string
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL