server

package
v0.0.0-...-0490640 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPC

func NewGRPC(ctx context.Context, config *Config) *grpc.Server

NewGRPC creates the gRPC server.

func StartGRPC

func StartGRPC(ctx context.Context, config *Config) error

StartGRPC starts the gRPC server

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

func ConfigFromViper() (*Config, error)

ConfigFromViper marshals configuration from the LicenseControlServer servers configuration file that is parsed Viper into the Config struct.

func (Config) ListenAddress

func (c Config) ListenAddress() string

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

License returns the license information

func (*LicenseControlServer) Policy

Policy sends the constructed Policy. Currently we don't process any request input.

func (*LicenseControlServer) Status

Status returns the LicenseControlServer status information

func (*LicenseControlServer) Telemetry

Telemetry endpoint to return telemetry configuration

func (*LicenseControlServer) Update

Update updates the LicenseControlServer with the new license information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL