Versions in this module Expand all Collapse all v1 v1.1.1 Aug 18, 2020 Changes in this version + const ControlProxyServiceName + const DefaultSharedCloudConnectionTTL + const GrpcMaxDelaySec + const GrpcMaxLocalTimeoutSec + const GrpcMaxTimeoutSec + func AddService(location ServiceLocation) + func AddServices(locations ...ServiceLocation) + func FindServices(label string) []string + func GetAnnotation(service, annotationName string) (string, error) + func GetAnnotationList(service, annotationName string) ([]string, error) + func GetClientConnection(ctx context.Context, addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error) + func GetConnection(service string) (*grpc.ClientConn, error) + func GetConnectionImpl(ctx context.Context, service string, opts ...grpc.DialOption) (*grpc.ClientConn, error) + func GetEchoServerPort(service string) (int, error) + func GetServiceAddress(service string) (string, error) + func GetServicePort(service string) (int, error) + func GetServiceProxyAliases(service string) (map[string]int, error) + func GetSharedCloudConnectionTTL() time.Duration + func ListAllServices() []string + func ListControllerServices() []string + func MustPopulateServices() + func PopulateServices() error + func RemoveService(service string) + func RemoveServicesWithLabel(label string) + func SetSharedCloudConnectionTTL(ttl time.Duration) + type ServiceLocation struct + Annotations map[string]string + EchoPort int + Host string + Labels map[string]string + Name string + Port int + ProxyAliases map[string]int + func LoadServiceRegistryConfig(moduleName string) ([]ServiceLocation, error) + func LoadServiceRegistryConfigs() ([]ServiceLocation, error) + func (s ServiceLocation) HasLabel(label string) bool + func (s ServiceLocation) String() string + type ServiceRegistry struct + ServiceConnections map[string]*grpc.ClientConn + ServiceLocations map[string]ServiceLocation + func Get() *ServiceRegistry + func New() *ServiceRegistry + func (r *ServiceRegistry) AddService(location ServiceLocation) + func (r *ServiceRegistry) AddServices(locations ...ServiceLocation) + func (r *ServiceRegistry) CleanupSharedCloudConnection(service string) bool + func (r *ServiceRegistry) FindServices(label string) []string + func (r *ServiceRegistry) GetAnnotation(service, annotationName string) (string, error) + func (r *ServiceRegistry) GetAnnotationList(service, annotationName string) ([]string, error) + func (r *ServiceRegistry) GetCloudConnection(service string) (*grpc.ClientConn, error) + func (r *ServiceRegistry) GetCloudConnectionFromServiceConfig(controlProxyConfig *config.ConfigMap, service string) (*grpc.ClientConn, error) + func (r *ServiceRegistry) GetConnection(service string) (*grpc.ClientConn, error) + func (r *ServiceRegistry) GetConnectionImpl(ctx context.Context, service string, opts ...grpc.DialOption) (*grpc.ClientConn, error) + func (r *ServiceRegistry) GetEchoServerPort(service string) (int, error) + func (r *ServiceRegistry) GetServiceAddress(service string) (string, error) + func (r *ServiceRegistry) GetServicePort(service string) (int, error) + func (r *ServiceRegistry) GetServiceProxyAliases(service string) (map[string]int, error) + func (r *ServiceRegistry) GetSharedCloudConnection(service string) (*grpc.ClientConn, error) + func (r *ServiceRegistry) GetSharedCloudConnectionFromServiceConfig(controlProxyConfig *config.ConfigMap, service string) (*grpc.ClientConn, error) + func (r *ServiceRegistry) ListAllServices() []string + func (r *ServiceRegistry) RemoveService(service string) + func (r *ServiceRegistry) RemoveServicesWithLabel(label string) Other modules containing this package github.com/go-magma/magma