Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultDownstreamBindAddr = "0.0.0.0" DefaultUpstreamBindAddr = "127.0.0.1" DefaultReadTimeout = 60 * time.Second DefaultConnectTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ServiceName string
ServiceID string
Downstream Downstream
Upstreams []Upstream
}
type Downstream ¶
type Downstream struct {
LocalBindAddress string
LocalBindPort int
Protocol string
TargetAddress string
TargetPort int
ConnectTimeout time.Duration
ReadTimeout time.Duration
EnableForwardFor bool
AppNameHeaderName string
TLS
}
func (Downstream) Equal ¶
func (d Downstream) Equal(o Downstream) bool
type Logger ¶
type Logger interface {
// Debugf Display debug message
Debugf(format string, args ...interface{})
// Infof Display info message
Infof(format string, args ...interface{})
// Warnf Display warning message
Warnf(format string, args ...interface{})
// Errorf Display error message
Errorf(format string, args ...interface{})
}
Logger Allows replacing easily the logger.
func NewTestingLogger ¶
NewTestingLogger creates a Logger for testing.T
type Upstream ¶
type UpstreamNode ¶
func (UpstreamNode) Equal ¶
func (n UpstreamNode) Equal(o UpstreamNode) bool
func (UpstreamNode) ID ¶
func (n UpstreamNode) ID() string
Click to show internal directories.
Click to hide internal directories.