Documentation
¶
Overview ¶
Package grpcflag implements functions to use gRPC with github.com/urfave/cli/v2.
Index ¶
- type Config
- type Dialer
- func (f *Dialer) Address() string
- func (f *Dialer) Before(c *cli.Context) error
- func (f *Dialer) Block() bool
- func (f *Dialer) Dial() (*grpc.ClientConn, error)
- func (f *Dialer) DialContext(ctx context.Context) (*grpc.ClientConn, error)
- func (f *Dialer) DialOption() ([]grpc.DialOption, error)
- func (f *Dialer) Flags() []cli.Flag
- func (f *Dialer) Insecure() bool
- func (f *Dialer) Network() string
- func (f *Dialer) TLSCertKeys() []string
- func (f *Dialer) TLSCerts() []string
- func (f *Dialer) TLSConfig() (*tls.Config, error)
- func (f *Dialer) TLSMaxVersion() uint16
- func (f *Dialer) TLSMinVersion() uint16
- func (f *Dialer) TLSRootCAs() []string
- func (f *Dialer) TLSServerName() string
- func (f *Dialer) TLSSkipVerify() bool
- type Option
- type Server
- func (f *Server) Address() string
- func (f *Server) Before(c *cli.Context) error
- func (f *Server) Flags() []cli.Flag
- func (f *Server) Listen() (net.Listener, error)
- func (f *Server) ListenAndServe(s *grpc.Server) error
- func (f *Server) ListenNetwork(network string) (net.Listener, error)
- func (f *Server) ListenNetworkAndServe(network string, s *grpc.Server) error
- func (f *Server) LookupTLSVerifyClient() (val bool, ok bool)
- func (f *Server) Network() string
- func (f *Server) NewServer(opt ...grpc.ServerOption) (*grpc.Server, error)
- func (f *Server) Reflection() bool
- func (f *Server) ServerOptions(opt ...grpc.ServerOption) ([]grpc.ServerOption, error)
- func (f *Server) TLSCertKeys() []string
- func (f *Server) TLSCerts() []string
- func (f *Server) TLSClientCAs() []string
- func (f *Server) TLSConfig() (*tls.Config, error)
- func (f *Server) TLSGenCert() bool
- func (f *Server) TLSMaxVersion() uint16
- func (f *Server) TLSMinVersion() uint16
- func (f *Server) TLSVerifyClient() bool
- func (f *Server) UseTLS() bool
- type TLSVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Network []string Address string Reflection bool TLSMinVersion uint16 TLSMaxVersion uint16 }
func (*Config) NetworkPredetermined ¶
func (*Config) NetworkRequired ¶
func (*Config) NetworkUsage ¶
func (*Config) NetworkValue ¶
type Dialer ¶
type Dialer struct { Name string // PredeterminedNetwork is true if the value of FlagNetwork is predetermined by the option. PredeterminedNetwork bool FlagNetwork *cli.StringFlag FlagAddress *cli.StringFlag FlagInsecure *cli.BoolFlag FlagBlock *cli.BoolFlag FlagTLSRootCAs *cli.StringSliceFlag FlagTLSServerName *cli.StringFlag FlagTLSSkipVerify *cli.BoolFlag FlagTLSCerts *cli.StringSliceFlag FlagTLSCertKeys *cli.StringSliceFlag FlagTLSMinVersion *cli.GenericFlag FlagTLSMaxVersion *cli.GenericFlag FlagSet clix.FlagSet }
func NewDialerName ¶
func NewDialerName(prefix clix.FlagPrefix, name string, opt ...Option) *Dialer
func (*Dialer) DialContext ¶
func (*Dialer) DialOption ¶
func (f *Dialer) DialOption() ([]grpc.DialOption, error)
func (*Dialer) TLSCertKeys ¶
func (*Dialer) TLSMaxVersion ¶
func (*Dialer) TLSMinVersion ¶
func (*Dialer) TLSRootCAs ¶
func (*Dialer) TLSServerName ¶
func (*Dialer) TLSSkipVerify ¶
type Server ¶
type Server struct { Name string PredeterminedNetwork bool FlagNetwork *cli.StringFlag FlagAddress *cli.StringFlag FlagReflection *cli.BoolFlag FlagTLSCerts *cli.StringSliceFlag FlagTLSCertKeys *cli.StringSliceFlag FlagTLSGenCert *cli.BoolFlag FlagTLSVerifyClient *cli.BoolFlag FlagTLSClientCAs *cli.StringSliceFlag FlagTLSMinVersion *cli.GenericFlag FlagTLSMaxVersion *cli.GenericFlag FlagSet clix.FlagSet }
func NewServerName ¶
func NewServerName(prefix clix.FlagPrefix, name string, opt ...Option) *Server
func (*Server) ListenNetworkAndServe ¶
func (*Server) LookupTLSVerifyClient ¶
func (*Server) Reflection ¶
func (*Server) ServerOptions ¶
func (f *Server) ServerOptions(opt ...grpc.ServerOption) ([]grpc.ServerOption, error)
func (*Server) TLSCertKeys ¶
func (*Server) TLSClientCAs ¶
func (*Server) TLSGenCert ¶
func (*Server) TLSMaxVersion ¶
func (*Server) TLSMinVersion ¶
func (*Server) TLSVerifyClient ¶
type TLSVersion ¶
type TLSVersion struct {
// contains filtered or unexported fields
}
TLSVersion wraps a uint16 as tls.Version* to satisfy flag.Value.
func NewTLSVersion ¶
func NewTLSVersion(value uint16) *TLSVersion
NewTLSVersion creates a *TLSVersion with a default value.
func (*TLSVersion) Set ¶
func (tv *TLSVersion) Set(value string) error
Set parses value as TLS version string, sets it.
func (*TLSVersion) String ¶
func (tv *TLSVersion) String() string
String returns a readable representation of this value (for usage defaults)
func (*TLSVersion) Value ¶
func (tv *TLSVersion) Value() uint16
Value returns an uint16 as TLS version set by this flag.
Click to show internal directories.
Click to hide internal directories.