balancer

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileOnline  = 1
	FileOffline = 2
)
View Source
const (
	FileCacheSize    = 1024
	ServiceCacheSize = 512
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	State  int
	Path   *string
	Mirror *pb.Mirror
}

type Monitor

type Monitor struct {
	Client       *client.Client
	Logger       *log.Logger
	Services     []*Service
	ServiceCache *lru.ARCCache
	Mutex        *sync.Mutex
}

func NewMonitor

func NewMonitor(c *client.Client) *Monitor

func (*Monitor) Authorize

func (m *Monitor) Authorize() error

func (*Monitor) Preload

func (m *Monitor) Preload()

type Service

type Service struct {
	Orig      *pb.Service
	Files     []*File
	FileCache *lru.ARCCache
	Monitor   *Monitor
}

func NewService

func NewService(s *pb.Service, m *Monitor) *Service

func (*Service) Preload

func (s *Service) Preload()

Jump to

Keyboard shortcuts

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