Documentation ¶
Index ¶
- func NewGRPC(ctx context.Context, config *Config) (*grpc.Server, error)
- func StartGRPC(ctx context.Context, config *Config) error
- type CerealConfig
- type Config
- type LicenseAudit
- type LicenseControlServer
- func (s *LicenseControlServer) GetDeploymentID(ctx context.Context, req *lc.GetDeploymentIDRequest) (*lc.GetDeploymentIDResponse, error)
- func (s *LicenseControlServer) License(ctx context.Context, req *lc.LicenseRequest) (*lc.LicenseResponse, error)
- func (s *LicenseControlServer) Policy(ctx context.Context, req *lc.PolicyRequest) (*lc.PolicyResponse, error)
- func (s *LicenseControlServer) Status(ctx context.Context, req *lc.StatusRequest) (*lc.StatusResponse, error)
- func (s *LicenseControlServer) Telemetry(ctx context.Context, req *lc.TelemetryRequest) (*lc.TelemetryResponse, error)
- func (s *LicenseControlServer) Update(ctx context.Context, req *lc.UpdateRequest) (*lc.UpdateResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CerealConfig ¶
type CerealConfig struct {
Target string `mapstructure:"target"`
}
type Config ¶
type Config struct { Host string `mapstructure:"host" toml:"host"` Port int `mapstructure:"port" toml:"port"` LicenseTokenPath string `mapstructure:"license_token_path" toml:"license_token_path"` MigrationsPath string `mapstructure:"migrations_path" toml:"migrations_path"` PGURL string `mapstructure:"pg_url" toml:"pg_url"` Database string `mapstructure:"database" toml:"database"` TLSConfig certs.TLSConfig `toml:"tls"` OptOutPath string `mapstructure:"opt_out_path" toml:"opt_out_path"` URL string `mapstructure:"url" toml:"url"` OptOut string `mapstructure:"opt_out" toml:"opt_out"` TelemetryEnabled bool ServiceCerts *certs.ServiceCerts CerealConfig CerealConfig `mapstructure:"cereal"` LicenseAudit LicenseAudit `mapstructure:"license_audit"` }
Config is the LicenseControlServer client and server configuration
func ConfigFromViper ¶
ConfigFromViper marshals configuration from the LicenseControlServer servers configuration file that is parsed Viper into the Config struct.
func (Config) ListenAddress ¶
ListenAddress is the address where gRPC server will bind and listen
type LicenseAudit ¶
type LicenseControlServer ¶
type LicenseControlServer struct { TelemetryEnabled bool TelemetryURL string // contains filtered or unexported fields }
LicenseControlServer is our structure representing the gRPC server backend.
func NewLicenseControlServer ¶
func NewLicenseControlServer(ctx context.Context, backend storage.CurrentBackend, licenseParser *keys.LicenseParser, config *Config) *LicenseControlServer
NewLicenseControlServer returns a new instance of our LicenseControlServer.
func (*LicenseControlServer) GetDeploymentID ¶
func (s *LicenseControlServer) GetDeploymentID(ctx context.Context, req *lc.GetDeploymentIDRequest) (*lc.GetDeploymentIDResponse, error)
GetDeploymentID fetches the deployment id from license control service
func (*LicenseControlServer) License ¶
func (s *LicenseControlServer) License(ctx context.Context, req *lc.LicenseRequest) (*lc.LicenseResponse, error)
License returns the license information
func (*LicenseControlServer) Policy ¶
func (s *LicenseControlServer) Policy(ctx context.Context, req *lc.PolicyRequest) (*lc.PolicyResponse, error)
Policy sends the constructed Policy. Currently we don't process any request input.
func (*LicenseControlServer) Status ¶
func (s *LicenseControlServer) Status(ctx context.Context, req *lc.StatusRequest) (*lc.StatusResponse, error)
Status returns the LicenseControlServer status information
func (*LicenseControlServer) Telemetry ¶
func (s *LicenseControlServer) Telemetry(ctx context.Context, req *lc.TelemetryRequest) (*lc.TelemetryResponse, error)
Telemetry endpoint to return telemetry configuration
func (*LicenseControlServer) Update ¶
func (s *LicenseControlServer) Update(ctx context.Context, req *lc.UpdateRequest) (*lc.UpdateResponse, error)
Update updates the LicenseControlServer with the new license information