Documentation ¶
Index ¶
- Constants
- func CLIFlags(envPrefix string) []cli.Flag
- type CLIConfig
- type HealthzResponse
- type Server
- type ServerOption
- func WithAPIs(apis []rpc.API) ServerOption
- func WithCORSHosts(hosts []string) ServerOption
- func WithHTTPRecorder(recorder opmetrics.HTTPRecorder) ServerOption
- func WithHealthzHandler(hdlr http.Handler) ServerOption
- func WithHealthzPath(path string) ServerOption
- func WithJWTSecret(secret []byte) ServerOption
- func WithLogger(lgr log.Logger) ServerOption
- func WithRPCPath(path string) ServerOption
- func WithVHosts(hosts []string) ServerOption
Constants ¶
View Source
const ( ListenAddrFlagName = "rpc.addr" PortFlagName = "rpc.port" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLIConfig ¶
func ReadCLIConfig ¶
type HealthzResponse ¶
type HealthzResponse struct {
Version string `json:"version"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
type ServerOption ¶
type ServerOption func(b *Server)
func WithAPIs ¶
func WithAPIs(apis []rpc.API) ServerOption
func WithCORSHosts ¶
func WithCORSHosts(hosts []string) ServerOption
func WithHTTPRecorder ¶
func WithHTTPRecorder(recorder opmetrics.HTTPRecorder) ServerOption
func WithHealthzHandler ¶
func WithHealthzHandler(hdlr http.Handler) ServerOption
func WithHealthzPath ¶
func WithHealthzPath(path string) ServerOption
func WithJWTSecret ¶
func WithJWTSecret(secret []byte) ServerOption
func WithLogger ¶
func WithLogger(lgr log.Logger) ServerOption
func WithRPCPath ¶
func WithRPCPath(path string) ServerOption
func WithVHosts ¶
func WithVHosts(hosts []string) ServerOption
Click to show internal directories.
Click to hide internal directories.