trellis

package
v0.0.0-...-608e6a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcServerConfig

type GrpcServerConfig struct {
	KeepaliveTime     time.Duration `yaml:"keepalive_time" json:"keepalive_time"`
	KeepaliveTimeout  time.Duration `yaml:"keepalive_timeout" json:"keepalive_timeout"`
	ConnectionTimeout time.Duration `yaml:"connection_timeout" json:"connection_timeout"`
	NumStreamWorkers  uint32        `yaml:"num_stream_workers" json:"num_stream_workers"`

	Tracing bool `yaml:"tracing" json:"tracing"`

	Address   string     `yaml:"address" json:"address"`
	EnableTLS bool       `yaml:"enable_tls" json:"enable_tls"`
	TLSConfig tls.Config `yaml:",inline" json:",inline"`
}

func (*GrpcServerConfig) ParseFlags

func (cfg *GrpcServerConfig) ParseFlags(f *flag.FlagSet)

func (*GrpcServerConfig) ParseFlagsWithPrefix

func (cfg *GrpcServerConfig) ParseFlagsWithPrefix(prefix string, f *flag.FlagSet)

ParseFlagsWithPrefix adds the flags required to config this to the given FlagSet.

type HTTP2Config

type HTTP2Config struct {
	// PingInterval is the interval at which the server will send a
	// ping message to a client.
	//
	// To disable pings set the PingInterval to a negative value.
	PingInterval time.Duration `yaml:"ping_interval" json:"ping_interval"`

	// ...
	MaxConcurrentStreams int `yaml:"max_concurrent_streams" json:"max_concurrent_streams"`

	// Debug is a flag that will allow the library to print debugging information.
	Debug bool `yaml:"debug" json:"debug"`
}

func (*HTTP2Config) ParseFlagsWithPrefix

func (cfg *HTTP2Config) ParseFlagsWithPrefix(prefix string, f *flag.FlagSet)

ParseFlagsWithPrefix adds the flags required to config this to the given FlagSet.

type HTTPGroup

type HTTPGroup struct {
	Path     string         `yaml:"path" json:"path"`
	Uses     []string       `yaml:"uses" json:"uses"`
	Handlers []*HTTPHandler `yaml:"handlers" json:"handlers"`
}

type HTTPHandler

type HTTPHandler struct {
	Method  string           `yaml:"method" json:"method"`
	Path    string           `yaml:"path" json:"path"`
	Uses    []string         `yaml:"uses" json:"uses"`
	Handler string           `yaml:"handler" json:"handler"`
	Service *service.Service `yaml:"service" json:"service"`
}

type HTTPServerConfig

type HTTPServerConfig struct {
	Protocol string `yaml:"protocol" json:"protocol"`

	HTTP2Config HTTP2Config `yaml:",inline" json:",inline"`

	IsGateway bool `yaml:"is_gateway" json:"is_gateway"`

	Handlers []*HTTPHandler `yaml:"handlers" json:"handlers"`
	Groups   []*HTTPGroup   `yaml:"groups" json:"groups"`

	RecoverTrace     bool          `yaml:"recover_trace" json:"recover_trace"`
	Address          string        `yaml:"address" json:"address"`
	DisableKeepAlive bool          `yaml:"disable_keep_alive" json:"disable_keep_alive"`
	IdleTimeout      time.Duration `yaml:"idle_timeout" json:"idle_timeout"`
	EnableTLS        bool          `yaml:"enable_tls" json:"enable_tls"`
	TLSConfig        tls.Config    `yaml:",inline" json:",inline"`
}

func (*HTTPServerConfig) ParseFlags

func (cfg *HTTPServerConfig) ParseFlags(f *flag.FlagSet)

func (*HTTPServerConfig) ParseFlagsWithPrefix

func (cfg *HTTPServerConfig) ParseFlagsWithPrefix(prefix string, f *flag.FlagSet)

ParseFlagsWithPrefix adds the flags required to config this to the given FlagSet.

type ServerConfig

type ServerConfig struct {
	ServerName string `yaml:"server_name" json:"server_name"`
	ServerType int    `yaml:"server_type" json:"server_type"`

	HTTPServerConfig HTTPServerConfig `yaml:"http_server_config" json:"http_server_config"`
	GrpcServerConfig GrpcServerConfig `yaml:"grpc_server_config" json:"grpc_server_config"`

	TracingConfig TracingConfig `yaml:"tracing_config" json:"tracing_config"`

	RouterConfig router.Config `yaml:"router_config" json:"router_config"`
}

func (*ServerConfig) ParseFlags

func (cfg *ServerConfig) ParseFlags(f *flag.FlagSet)

func (*ServerConfig) ParseFlagsWithPrefix

func (cfg *ServerConfig) ParseFlagsWithPrefix(prefix string, f *flag.FlagSet)

ParseFlagsWithPrefix adds the flags required to config this to the given FlagSet.

type TracingConfig

type TracingConfig struct {
	Enable bool `yaml:"enable" json:"enable"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL