Documentation ¶
Index ¶
- func NewGRPC(ctx context.Context, config *Config) *grpc.Server
- func StartGRPC(ctx context.Context, config *Config) error
- type Config
- type LicenseControlServer
- 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 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"` 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 }
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 LicenseControlServer ¶
type LicenseControlServer struct {
// contains filtered or unexported fields
}
LicenseControlServer is our structure representing the gRPC server backend.
func NewLicenseControlServer ¶
func NewLicenseControlServer(config *Config) *LicenseControlServer
NewLicenseControlServer returns a new instance of our LicenseControlServer.
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