Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NAT = "nat" ROUTE = "route" TUNNEL = "tunnel" )
View Source
var ( Protocols = []string{"tcp", "udp"} Schedulers = []string{"rr", "wrr", "lc"} )
View Source
var ( ErrServiceNotFound = ErrNotFound("service not found") ErrDestinationNotFound = ErrNotFound("destination not found") ErrCheckNotFound = ErrNotFound("check not found") ErrServiceConflict = ErrConflict("service already exists") ErrDestinationConflict = ErrConflict("destination already exists") )
Functions ¶
This section is empty.
Types ¶
type Destination ¶
type Destination struct { Name string `validate:"required"` Address string `validate:"required"` Port uint16 `validate:"gte=1,lte=47808,required"` Weight int32 Mode string `validate:"required"` ServiceId string `validate:"required"` }
func (Destination) Equal ¶
func (d Destination) Equal(dst Destination) bool
func (Destination) GetId ¶
func (dst Destination) GetId() string
func (Destination) IpvsId ¶
func (dst Destination) IpvsId() string
type DestinationList ¶
type DestinationList []Destination
func (DestinationList) Len ¶
func (l DestinationList) Len() int
func (DestinationList) Less ¶
func (l DestinationList) Less(i, j int) bool
func (DestinationList) Swap ¶
func (l DestinationList) Swap(i, j int)
type ErrConflict ¶
type ErrConflict string
func (ErrConflict) Error ¶
func (e ErrConflict) Error() string
type ErrNotFound ¶
type ErrNotFound string
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
type ErrValidation ¶
func (ErrValidation) Error ¶
func (e ErrValidation) Error() string
Click to show internal directories.
Click to hide internal directories.