Documentation ¶
Index ¶
- func GetClientCredByBytes(crt, key, ca []byte, servername string) (cred credentials.TransportCredentials, err error)
- func GetClientCredByFile(crt, key, ca, servername string) (cred credentials.TransportCredentials, err error)
- func GetServerCredByBytes(crt, key, ca []byte) (cred credentials.TransportCredentials, err error)
- func GetServerCredByFile(crt, key, ca string) (cred credentials.TransportCredentials, err error)
- func NewRpcServer(opts ...Option) (sv *grpc.Server, err error)
- type Option
- func WithCa(ca []byte) Option
- func WithCaFile(ca string) Option
- func WithCert(cert []byte) Option
- func WithCertFile(cert string) Option
- func WithKey(key []byte) Option
- func WithKeyFile(key string) Option
- func WithSecurity(security bool) Option
- func WithServerOption(serverOption ...grpc.ServerOption) Option
- type Options
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)
Types ¶
type Option ¶
type Option func(opts *Options)
func WithCaFile ¶
func WithCertFile ¶
func WithKeyFile ¶
func WithSecurity ¶
func WithServerOption ¶
func WithServerOption(serverOption ...grpc.ServerOption) Option
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func DefaultOpts ¶
func DefaultOpts() *Options
Click to show internal directories.
Click to hide internal directories.