grpc

package
v0.0.0-...-feb181f Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c CompletedConfig, authn middleware.Middleware, meter metric.Meter, logger log.Logger) (*kgrpc.Server, error)

New creates a new a gRPC server.

func NewWhiteListMatcher

func NewWhiteListMatcher(ctx context.Context, operation string) bool

Types

type CompletedConfig

type CompletedConfig struct {
	// contains filtered or unexported fields
}

CompletedConfig can be constructed only from Config.Complete

type Config

type Config struct {
	Options   *Options
	TLSConfig *tls.Config
}

func NewConfig

func NewConfig(o *Options) *Config

func (*Config) Complete

func (c *Config) Complete() (CompletedConfig, error)

type Options

type Options struct {
	Addr    string `mapstructure:"address"`
	Timeout int    `mapstructure:"timeout-seconds"`

	ServingCertFile string `mapstructure:"certfile"`
	PrivateKeyFile  string `mapstructure:"keyfile"`

	ClientCAFile string `mapstructure:"client-ca-file"`
	SNI          string `mapstructure:"sni-servername"`
	CertOpt      int    `mapstructure:"certopt"`
}

func NewOptions

func NewOptions() *Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet, prefix string)

func (*Options) Complete

func (o *Options) Complete() []error

func (*Options) Validate

func (o *Options) Validate() []error

Jump to

Keyboard shortcuts

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