Documentation ¶
Index ¶
- Variables
- func CustomCodeToLevel(code codes.Code) log.Level
- func GRPCDial(url string, entry *logrus.Entry, cos ...grpc.CallOption) (*grpc.ClientConn, error)
- func GetEnv(envName string, defaultValue string) string
- type GRPCTransport
- type GRPCTransportOptions
- type HTTPTransport
- type HTTPTransportOptions
- type Runner
- type Server
- type ServerOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ServerOptionDefault = &ServerOptions{
CloseTimeoutSeconds: 10,
}
ServerOptionDefault
Functions ¶
func CustomCodeToLevel ¶
CustomCodeToLevel to default OK calls to be debug level instead of info level
func GRPCDial ¶
func GRPCDial(url string, entry *logrus.Entry, cos ...grpc.CallOption) (*grpc.ClientConn, error)
GRPCDial is a helper function that creates a grpc.ClientConn with logging and prometheus interecepters
Types ¶
type GRPCTransport ¶
GRPCTransport properties
func NewGRPCTransport ¶
func NewGRPCTransport(opts *GRPCTransportOptions) (*GRPCTransport, error)
NewGRPCTransport
type GRPCTransportOptions ¶
GRPCTransportOptions hold options for server
type HTTPTransport ¶
type HTTPTransport struct { Logger *log.Entry Addr string Handler http.Handler Closers []io.Closer }
HTTPTransport
func NewHTTPTransport ¶
func NewHTTPTransport(opts *HTTPTransportOptions) (*HTTPTransport, error)
NewServer creates a new http transport
type HTTPTransportOptions ¶
GRPCTransportOptions hold options for server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server property
func NewServer ¶
func NewServer(opts *ServerOptions) (*Server, error)
NewServer creates a new Server
type ServerOptions ¶
type ServerOptions struct {
CloseTimeoutSeconds int64
}
ServerOptions hold options for server
Click to show internal directories.
Click to hide internal directories.