Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthKind ¶
type HealthKind string
const ( HealthKindTTL HealthKind = "ttl" HealthKindGRPC HealthKind = "grpc" )
type Options ¶
type Options struct { //Scheme *runtime.Scheme ServiceDiscoveryDcName string ServiceDiscovery discovery.ServiceDiscoveryType ServiceDiscoveryNamespace string Address string }
type Registrator ¶
type Registrator interface { //options // add a logger to the Registrator //WithLogger(log logging.Logger) // Register Register(ctx context.Context, s *Service) // DeRegister DeRegister(ctx context.Context, id string) // Query Query(ctx context.Context, serviceName string, tags []string) ([]*Service, error) // GetEndpointAddress returns the address/port of the serviceEndpoint GetEndpointAddress(ctx context.Context, serviceName string, tags []string) (string, error) // Watch // 1 channel per service to watch Watch(ctx context.Context, serviceName string, tags []string, opts WatchOptions) chan *ServiceResponse // all services through 1 channel WatchCh(ctx context.Context, serviceName string, tags []string, opts WatchOptions, ch chan *ServiceResponse) // StopWatch(serviceName string) }
TargetController defines the interfaces for the target controller
type ServiceResponse ¶
type WatchOptions ¶
type WatchOptions struct { // RetriveServices defines if service details are required // as part of ServiceResponse(s) RetriveServices bool }
Click to show internal directories.
Click to hide internal directories.