server

package
v0.0.0-...-298ae05 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientCredByBytes

func GetClientCredByBytes(crt, key, ca []byte, servername string) (cred credentials.TransportCredentials, err error)

func GetClientCredByFile

func GetClientCredByFile(crt, key, ca, servername string) (cred credentials.TransportCredentials, err error)

func GetServerCredByBytes

func GetServerCredByBytes(crt, key, ca []byte) (cred credentials.TransportCredentials, err error)

func GetServerCredByFile

func GetServerCredByFile(crt, key, ca string) (cred credentials.TransportCredentials, err error)

func NewRpcServer

func NewRpcServer(opts ...Option) (sv *grpc.Server, err error)

Types

type Option

type Option func(opts *Options)

func WithCa

func WithCa(ca []byte) Option

func WithCaFile

func WithCaFile(ca string) Option

func WithCert

func WithCert(cert []byte) Option

func WithCertFile

func WithCertFile(cert string) Option

func WithKey

func WithKey(key []byte) Option

func WithKeyFile

func WithKeyFile(key string) Option

func WithSecurity

func WithSecurity(security bool) Option

func WithServerOption

func WithServerOption(serverOption ...grpc.ServerOption) Option

type Options

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

func DefaultOpts

func DefaultOpts() *Options

Jump to

Keyboard shortcuts

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