Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { ServerConfig ServerConfig `yaml:"server"` DHCPConfig DHCPConfig `yaml:"dhcp"` ResolverConfig ResolverConfig `yaml:"resolver"` TCPForwardConfig TCPForwardConfig `yaml:"tcpforward"` UDPForwardConfig UDPForwardConfig `yaml:"udpforward"` Plugins map[string]string `yaml:"plugin"` }
func ParseConfig ¶
type DHCPConfig ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolve ¶
func (*Resolver) ApplyDomain ¶
type ResolverConfig ¶
type ResolverConfig struct {
EtcdEndpoints []string `yaml:"etcdEndpoints"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ListenAndServe ¶
type ServerConfig ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session defines each opennotr_client to opennotr_server connection
type SessionManager ¶ added in v1.0.3
type SessionManager struct {
// contains filtered or unexported fields
}
SessionManager defines the session info add/delete/get actions
func GetSessionManager ¶ added in v1.0.3
func GetSessionManager() *SessionManager
GetSessionManager returs the singleton of session manager
func (*SessionManager) AddSession ¶ added in v1.0.3
func (mgr *SessionManager) AddSession(vip string, sess *Session)
func (*SessionManager) DeleteSession ¶ added in v1.0.3
func (mgr *SessionManager) DeleteSession(vip string)
func (*SessionManager) GetSession ¶ added in v1.0.3
func (mgr *SessionManager) GetSession(vip string) *Session
type TCPForward ¶ added in v1.0.3
type TCPForward struct {
// contains filtered or unexported fields
}
func NewTCPForward ¶ added in v1.0.3
func NewTCPForward(cfg TCPForwardConfig) *TCPForward
type TCPForwardConfig ¶ added in v1.0.3
type UDPForward ¶ added in v1.0.3
type UDPForward struct {
// contains filtered or unexported fields
}
func NewUDPForward ¶ added in v1.0.3
func NewUDPForward(cfg UDPForwardConfig) *UDPForward
Click to show internal directories.
Click to hide internal directories.