service

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2017 License: MIT Imports: 9 Imported by: 37

Documentation

Index

Constants

View Source
const (
	ALIVE     = iota
	TOMBSTONE = iota
	UNHEALTHY = iota
	UNKNOWN   = iota
)

Variables

This section is empty.

Functions

func StatusString

func StatusString(status int) string

Types

type Port

type Port struct {
	Type        string
	Port        int64
	ServicePort int64
}

type Service

type Service struct {
	ID        string
	Name      string
	Image     string
	Created   time.Time
	Hostname  string
	Ports     []Port
	Updated   time.Time
	ProxyMode string
	Status    int
}

func Decode

func Decode(data []byte) *Service

func ToService

func ToService(container *docker.APIContainers) Service

Format an APIContainers struct into a more compact struct we can ship over the wire in a broadcast.

func (Service) Encode

func (svc Service) Encode() ([]byte, error)

func (*Service) Format

func (svc *Service) Format() string

func (*Service) Invalidates

func (svc *Service) Invalidates(otherSvc *Service) bool

func (*Service) IsAlive

func (svc *Service) IsAlive() bool

func (*Service) IsTombstone

func (svc *Service) IsTombstone() bool

func (*Service) PortForServicePort

func (svc *Service) PortForServicePort(findPort int64, pType string) int64

Look up a (usually Docker) mapped Port for a service by ServicePort

func (*Service) StatusString

func (svc *Service) StatusString() string

func (*Service) Tombstone

func (svc *Service) Tombstone()

Jump to

Keyboard shortcuts

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