config

package
v0.0.0-...-a03a6ab Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.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 Balancer

type Balancer struct {
	Attached             []string  `mapstructure:"attached" yaml:"attached"`
	Services             []Service `mapstructure:"services" yaml:"services"`
	UseTc                bool      `mapstructure:"use-tc" yaml:"use-tc,omitempty"`
	ExclusivePortEnabled bool      `mapstructure:"exclusive-port-enabled" yaml:"exclusive-port-enabled,omitempty"`
}

func (*Balancer) Add

func (c *Balancer) Add(s Service)

func (*Balancer) Attach

func (c *Balancer) Attach(ip string)

func (*Balancer) Del

func (c *Balancer) Del(s Service)

func (*Balancer) Detach

func (c *Balancer) Detach(ip string)

func (*Balancer) Equal

func (l *Balancer) Equal(r *Balancer) bool

type ConfigSet

type ConfigSet struct {
	Global Global   `mapstructure:"global" yaml:"global"`
	Nat    Balancer `mapstructure:"nat" yaml:"nat"`
	FNat   Balancer `mapstructure:"fnat" yaml:"fnat"`
	// contains filtered or unexported fields
}

func ReadConfigfile

func ReadConfigfile(path string) (*ConfigSet, error)

func (*ConfigSet) AddFNat

func (c *ConfigSet) AddFNat(s Service)

func (*ConfigSet) AddNat

func (c *ConfigSet) AddNat(s Service)

func (*ConfigSet) AttachFNat

func (c *ConfigSet) AttachFNat(ip string)

func (*ConfigSet) AttachNat

func (c *ConfigSet) AttachNat(ip string)

func (*ConfigSet) DelFNat

func (c *ConfigSet) DelFNat(s Service)

func (*ConfigSet) DelNat

func (c *ConfigSet) DelNat(s Service)

func (*ConfigSet) DetachFNat

func (c *ConfigSet) DetachFNat(ip string)

func (*ConfigSet) DetachNat

func (c *ConfigSet) DetachNat(ip string)

func (*ConfigSet) Save

func (c *ConfigSet) Save(path string) error

type Global

type Global struct {
	NatFilePath  string `mapstructure:"nat-filepath" yaml:"nat-filepath"`
	FNatFilePath string `mapstructure:"fnat-filepath" yaml:"fnat-filepath"`
	ConnTimeout  uint32 `mapstructure:"conn-timeout" yaml:"conn-timeout"`
	Group        string `mapstructure:"group" yaml:"group"`
}

func (*Global) Equal

func (l *Global) Equal(r *Global) bool

type Service

type Service struct {
	VirtualIP     string   `mapstructure:"virtual-ip" yaml:"virtual-ip,omitempty"`
	VirtualPort   uint32   `mapstructure:"virtual-port" yaml:"virtual-port,omitempty"`
	Protocol      string   `mapstructure:"protocol" yaml:"protocol,omitempty"`
	LocalIP       string   `mapstructure:"local-ip" yaml:"local-ip,omitempty"`
	RealPort      uint32   `mapstructure:"real-port" yaml:"real-port,omitempty"`
	ConnTimeout   uint32   `mapstructure:"conn-timeout" yaml:"conn-timeout,omitempty"`
	RealServerIPs []string `mapstructure:"real-server-ips" yaml:"real-server-ips,omitempty"`
}

func (*Service) Equal

func (l *Service) Equal(r *Service) bool

Jump to

Keyboard shortcuts

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