types

package
v0.0.0-...-398fed0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServiceNotFound          error = ErrNotFound("service not found")
	ErrDestinationNotFound      error = ErrNotFound("destination not found")
	ErrServiceAlreadyExists           = errors.New("service already exists")
	ErrDestinationAlreadyExists       = errors.New("destination already exists")
)

Functions

This section is empty.

Types

type Destination

type Destination struct {
	Name      string `valid:"required"`
	Host      string `valid:"required"`
	Port      uint16 `valid:"required"`
	Weight    int32
	Mode      string `valid:"required"`
	ServiceId string `valid:"required"`
	Stats     *DestinationStats
}

func (Destination) GetId

func (dst Destination) GetId() string

func (Destination) KernelKey

func (dst Destination) KernelKey() string

type DestinationStats

type DestinationStats struct {
	ActiveConns   uint32
	InactiveConns uint32
	PersistConns  uint32
}

type ErrNotFound

type ErrNotFound string

func (ErrNotFound) Error

func (e ErrNotFound) Error() string

type Service

type Service struct {
	Name         string `valid:"required"`
	Host         string
	Port         uint16 `valid:"required"`
	Protocol     string `valid:"required"`
	Scheduler    string `valid:"required"`
	Destinations []Destination
	Stats        *ServiceStats
}

func (Service) GetId

func (svc Service) GetId() string

func (Service) KernelKey

func (svc Service) KernelKey() string

type ServiceStats

type ServiceStats struct {
	Connections uint32
	PacketsIn   uint32
	PacketsOut  uint32
	BytesIn     uint64
	BytesOut    uint64
	CPS         uint32
	PPSIn       uint32
	PPSOut      uint32
	BPSIn       uint32
	BPSOut      uint32
}

Jump to

Keyboard shortcuts

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