Documentation ¶
Index ¶
- Constants
- type Configuration
- type Service
- func (s *Service) Authorizer() api.Authorizer
- func (s *Service) Query(_ context.Context, req *discovery.QueryRequest) (res *discovery.QueryResponse, err error)
- func (s *Service) SetAuthorizer(auth api.Authorizer)
- func (s *Service) Shutdown()
- func (s *Service) Start(_ context.Context, _ *discovery.StartDiscoveryRequest) (resp *discovery.StartDiscoveryResponse, err error)
- func (s *Service) StartDiscovery(discoverer discovery.Discoverer)
- type ServiceOption
Constants ¶
View Source
const ( ProviderAWS = "aws" ProviderK8S = "k8s" ProviderAzure = "azure" )
View Source
const (
// DefaultAssessmentAddress specifies the default gRPC address of the assessment service.
DefaultAssessmentAddress = "localhost:9090"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶ added in v1.3.6
type Service ¶
type Service struct { discovery.UnimplementedDiscoveryServer // contains filtered or unexported fields }
Service is an implementation of the Clouditor Discovery service. It should not be used directly, but rather the NewService constructor should be used.
func NewService ¶ added in v1.3.3
func NewService(opts ...ServiceOption) *Service
func (*Service) Authorizer ¶ added in v1.4.0
func (s *Service) Authorizer() api.Authorizer
Authorizer implements UsesAuthorizer.
func (*Service) Query ¶ added in v1.3.2
func (s *Service) Query(_ context.Context, req *discovery.QueryRequest) (res *discovery.QueryResponse, err error)
func (*Service) SetAuthorizer ¶ added in v1.4.0
func (s *Service) SetAuthorizer(auth api.Authorizer)
SetAuthorizer implements UsesAuthorizer.
func (*Service) Start ¶
func (s *Service) Start(_ context.Context, _ *discovery.StartDiscoveryRequest) (resp *discovery.StartDiscoveryResponse, err error)
Start starts discovery
func (*Service) StartDiscovery ¶ added in v1.3.3
func (s *Service) StartDiscovery(discoverer discovery.Discoverer)
type ServiceOption ¶ added in v1.3.14
type ServiceOption func(*Service)
ServiceOption is a functional option type to configure the discovery service.
func WithAssessmentAddress ¶ added in v1.3.14
func WithAssessmentAddress(address string) ServiceOption
WithAssessmentAddress is an option to configure the assessment service gRPC address.
func WithOAuth2Authorizer ¶ added in v1.4.0
func WithOAuth2Authorizer(config *clientcredentials.Config) ServiceOption
WithOAuth2Authorizer is an option to use an OAuth 2.0 authorizer
func WithProviders ¶ added in v1.4.0
func WithProviders(providersList []string) ServiceOption
WithProviders is an option to set providers for discovering
Click to show internal directories.
Click to hide internal directories.