Documentation ¶
Index ¶
- type Service
- func (s *Service) CreateDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.CreateDiscoveryConfigRequest) (*discoveryconfigv1.DiscoveryConfig, error)
- func (s *Service) DeleteAllDiscoveryConfigs(ctx context.Context, _ *discoveryconfigv1.DeleteAllDiscoveryConfigsRequest) (*emptypb.Empty, error)
- func (s *Service) DeleteDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.DeleteDiscoveryConfigRequest) (*emptypb.Empty, error)
- func (s *Service) GetDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.GetDiscoveryConfigRequest) (*discoveryconfigv1.DiscoveryConfig, error)
- func (s *Service) ListDiscoveryConfigs(ctx context.Context, req *discoveryconfigv1.ListDiscoveryConfigsRequest) (*discoveryconfigv1.ListDiscoveryConfigsResponse, error)
- func (s *Service) UpdateDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.UpdateDiscoveryConfigRequest) (*discoveryconfigv1.DiscoveryConfig, error)
- func (s *Service) UpsertDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.UpsertDiscoveryConfigRequest) (*discoveryconfigv1.DiscoveryConfig, error)
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { discoveryconfigv1.UnimplementedDiscoveryConfigServiceServer // contains filtered or unexported fields }
Service implements the teleport.DiscoveryConfig.v1.DiscoveryConfigService RPC service.
func NewService ¶
func NewService(cfg ServiceConfig) (*Service, error)
NewService returns a new DiscoveryConfigs gRPC service.
func (*Service) CreateDiscoveryConfig ¶
func (s *Service) CreateDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.CreateDiscoveryConfigRequest) (*discoveryconfigv1.DiscoveryConfig, error)
CreateDiscoveryConfig creates a new DiscoveryConfig resource.
func (*Service) DeleteAllDiscoveryConfigs ¶
func (s *Service) DeleteAllDiscoveryConfigs(ctx context.Context, _ *discoveryconfigv1.DeleteAllDiscoveryConfigsRequest) (*emptypb.Empty, error)
DeleteAllDiscoveryConfigs removes all DiscoveryConfig resources.
func (*Service) DeleteDiscoveryConfig ¶
func (s *Service) DeleteDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.DeleteDiscoveryConfigRequest) (*emptypb.Empty, error)
DeleteDiscoveryConfig removes the specified DiscoveryConfig resource.
func (*Service) GetDiscoveryConfig ¶
func (s *Service) GetDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.GetDiscoveryConfigRequest) (*discoveryconfigv1.DiscoveryConfig, error)
GetDiscoveryConfig returns the specified DiscoveryConfig resource.
func (*Service) ListDiscoveryConfigs ¶
func (s *Service) ListDiscoveryConfigs(ctx context.Context, req *discoveryconfigv1.ListDiscoveryConfigsRequest) (*discoveryconfigv1.ListDiscoveryConfigsResponse, error)
ListDiscoveryConfigs returns a paginated list of all DiscoveryConfig resources.
func (*Service) UpdateDiscoveryConfig ¶
func (s *Service) UpdateDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.UpdateDiscoveryConfigRequest) (*discoveryconfigv1.DiscoveryConfig, error)
UpdateDiscoveryConfig updates an existing DiscoveryConfig.
func (*Service) UpsertDiscoveryConfig ¶
func (s *Service) UpsertDiscoveryConfig(ctx context.Context, req *discoveryconfigv1.UpsertDiscoveryConfigRequest) (*discoveryconfigv1.DiscoveryConfig, error)
UpsertDiscoveryConfig creates or updates a DiscoveryConfig.
type ServiceConfig ¶
type ServiceConfig struct { // Logger is the logger to use. Logger logrus.FieldLogger // Authorizer is the authorizer to use. Authorizer authz.Authorizer // Backend is the backend for storing DiscoveryConfigs. Backend services.DiscoveryConfigs // Clock is the clock. Clock clockwork.Clock }
ServiceConfig holds configuration options for the DiscoveryConfig gRPC service.
func (*ServiceConfig) CheckAndSetDefaults ¶
func (s *ServiceConfig) CheckAndSetDefaults() error
CheckAndSetDefaults checks the ServiceConfig fields and returns an error if a required param is not provided. Authorizer, Cache and Backend are required params