servercore

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2017 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DockerURL docker url
	DockerURL = "unix:///var/run/docker.sock"
	//DockerVersion docker version
	DockerVersion = "1.24"
	//ServiceFailedTimeout max time allowed to start a service
	ServiceFailedTimeout = 30 //seconds
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AMPInfraManager

type AMPInfraManager struct {
	Silence bool
	Verbose bool
	Force   bool
	Local   bool
	Status  string
	// contains filtered or unexported fields
}

AMPInfraManager infra stack management

func (*AMPInfraManager) ComputeStatus

func (s *AMPInfraManager) ComputeStatus(stack *ampStack)

ComputeStatus compute amp status

func (*AMPInfraManager) Init

func (s *AMPInfraManager) Init(server *ClusterServer, clientID string, firstMessage string) error

Init initialize the struct

func (*AMPInfraManager) Monitor

func (s *AMPInfraManager) Monitor(stack *ampStack) (*[]*servergrpc.TypedOutput, error)

Monitor monitor amp services

func (*AMPInfraManager) Perrorf

func (s *AMPInfraManager) Perrorf(format string, args ...interface{})

Perrorf print error

func (*AMPInfraManager) Pinfof

func (s *AMPInfraManager) Pinfof(format string, args ...interface{})

Pinfof print info

func (*AMPInfraManager) Pregularf

func (s *AMPInfraManager) Pregularf(format string, args ...interface{})

Pregularf print regular

func (*AMPInfraManager) Psuccessf

func (s *AMPInfraManager) Psuccessf(col int, format string, args ...interface{})

Psuccessf print success

func (*AMPInfraManager) Pull

func (s *AMPInfraManager) Pull(agent *Agent, stack *ampStack) (int, int)

Pull pull all amp images

func (*AMPInfraManager) Puserf

func (s *AMPInfraManager) Puserf(col int, format string, args ...interface{})

Puserf print user

func (*AMPInfraManager) Pwarnf

func (s *AMPInfraManager) Pwarnf(format string, args ...interface{})

Pwarnf print warn

func (*AMPInfraManager) Start

func (s *AMPInfraManager) Start(stack *ampStack) error

Start start amp

func (*AMPInfraManager) Stop

func (s *AMPInfraManager) Stop(stack *ampStack) error

Stop stop amp

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent struct

type AmpClient

type AmpClient struct {
	// contains filtered or unexported fields
}

AmpClient struct

type ClusterServer

type ClusterServer struct {
	// contains filtered or unexported fields
}

ClusterServer struct

func (*ClusterServer) AgentHealth

AgentHealth verifie if the server i is still available

func (*ClusterServer) AmpMonitor

AmpMonitor amp monitor

func (*ClusterServer) AmpPull

AmpPull amp pull

func (*ClusterServer) AmpStart

AmpStart amp start

func (*ClusterServer) AmpStop

AmpStop amp stop

func (*ClusterServer) GetAmpStatus

GetAmpStatus get amp status

func (*ClusterServer) GetClientStream

GetClientStream connect a bidirectionnal-stream

func (*ClusterServer) GetNodesInfo

GetNodesInfo get node info

func (*ClusterServer) Init

func (s *ClusterServer) Init(version string, build string) error

Init Connect to docker engine, get initial containers list and start the agent

func (*ClusterServer) PurgeNodes

PurgeNodes purge nodes

func (*ClusterServer) RegisterAgent

RegisterAgent register an agent

type Logf

type Logf struct {
	// contains filtered or unexported fields
}

Logf logger

type ServerConfig

type ServerConfig struct {
	// contains filtered or unexported fields
}

ServerConfig configuration parameters

Jump to

Keyboard shortcuts

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