Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string // Name of the GRPC Server Address string // Address on which the server will be accessible Port uint16 // Port on which the server will be accessible TLSEnabled bool // Whether or not traffic should be served via HTTPS TLSCrtPath string // Location of TLS Certificate TLSKeyPath string // Location of TLS Key ServerRegistration func(*grpc.Server) // Callback for registering GRPC API Servers StreamInterceptors []grpc.StreamServerInterceptor // A list of global GRPC stream interceptor functions to be called. Order is honored left to right. UnaryInterceptors []grpc.UnaryServerInterceptor // A list of global GRPC unary interceptor functions to be called. Order is honored left to right. CancelSignals []os.Signal // OS Signals to be used to cancel running servers. Defaults to SIGINT/`os.Interrupt`. }
Config contains the configuration necessary for running a GRPC Server.
func NewDefaultConfig ¶
NewDefaultConfig returns a default GRPC server config object. The caller must still supply the name of the server and a serverRegistration callback. The serverRegistration callback is a function that registers GRPC API servers with the provided GRPC server.
func (Config) NewServer ¶
NewServer creates and returns a configured Server object given a GRPC configuration object.
func (*Config) RegisterFlags ¶
RegisterFlags registers GRPC flags with pflags
Click to show internal directories.
Click to hide internal directories.