Documentation ¶
Index ¶
- Constants
- Variables
- func AddEnv(env_str string) error
- func Init()
- func PurgeLogstashIndices(days int, gb int) error
- type ExitError
- type IService
- type IServiceDefinition
- type IServiceTest
- type Manager
- func (m *Manager) Notify(val interface{}) error
- func (m *Manager) Register(svc *IService) error
- func (m *Manager) SetConfigurationOption(name, key string, value interface{}) error
- func (m *Manager) SetVolumesDir(dir string)
- func (m *Manager) Start() error
- func (m *Manager) Stop() error
- func (m *Manager) TearDown() error
- func (m *Manager) Wipe() error
- type ManagerTestSuite
- type StartError
- type StopError
Constants ¶
View Source
const ( IMAGE_REPO = "zenoss/serviced-isvcs" IMAGE_TAG = "v26" )
Variables ¶
View Source
var ( ErrNotRunning = errors.New("isvc: not running") ErrRunning = errors.New("isvc: running") ErrBadContainerSpec = errors.New("isvc: bad service specification") )
View Source
var ( ErrManagerUnknownOp = errors.New("manager: unknown operation") ErrManagerUnknownArg = errors.New("manager: unknown arg type") ErrImageNotExists = errors.New("manager: image does not exist") ErrNotifyFailed = errors.New("manager: notification failure") )
View Source
var CeleryIRS RunningService
View Source
var CeleryISVC Service
View Source
var DockerRegistryIRS RunningService
View Source
var DockerRegistryISVC Service
View Source
var ElasticsearchLogStashIRS RunningService
View Source
var ElasticsearchLogStashISVC Service
View Source
var ElasticsearchServicedIRS RunningService
View Source
var ElasticsearchServicedISVC Service
View Source
var IRSMap map[string]*RunningService
View Source
var ISVCSMap map[string]*Service
View Source
var InternalServicesIRS RunningService
View Source
var InternalServicesISVC Service
View Source
var LogstashIRS RunningService
View Source
var LogstashISVC Service
View Source
var OpentsdbIRS RunningService
View Source
var OpentsdbISVC Service
View Source
var Zookeeper = IServiceDefinition{ Name: "zookeeper", Repo: IMAGE_REPO, Tag: IMAGE_TAG, Command: func() string { return "exec /opt/zookeeper-3.4.5/bin/zkServer.sh start-foreground" }, Ports: []uint16{2181, 12181}, Volumes: map[string]string{"data": "/tmp"}, HealthCheck: zkHealthCheck, }
View Source
var ZookeeperIRS RunningService
View Source
var ZookeeperISVC Service
Functions ¶
func PurgeLogstashIndices ¶
Types ¶
type IService ¶
type IService struct { IServiceDefinition // contains filtered or unexported fields }
func NewIService ¶
func NewIService(sd IServiceDefinition) (*IService, error)
type IServiceDefinition ¶
type IServiceDefinition struct { Name string // name of the service (used in naming containers) Repo string // the service's docker repository Tag string // the service's docker repository tag Command func() string // the command to run in the container Volumes map[string]string // volumes to bind mount to the container Ports []uint16 // ports to expose to the host HealthCheck func() error // A function to verify the service is healthy Configuration map[string]interface{} // service specific configuration Notify func(*IService, interface{}) error // A function to run when notified of a data event PostStart func(*IService) error // A function to run after the initial start of the service HostNetwork bool // enables host network in the container }
type IServiceTest ¶
type IServiceTest interface { GetService(c *C) *IService Create(c *C) Destroy(c *C) SetUp(c *C) }
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
A manager of docker services run in ephemeral containers
var Mgr *Manager
func NewManager ¶
Returns a new Manager struct and starts the Manager's main loop()
func (*Manager) Notify ¶
Notify() sends a notify() message to all the containers with the given data val
func (*Manager) SetConfigurationOption ¶
func (*Manager) SetVolumesDir ¶
SetVolumesDir sets the volumes dir for *Manager
type ManagerTestSuite ¶
type ManagerTestSuite struct {
// contains filtered or unexported fields
}
func (*ManagerTestSuite) AddTestService ¶
func (t *ManagerTestSuite) AddTestService(svc IServiceTest)
func (*ManagerTestSuite) SetUpSuite ¶
func (t *ManagerTestSuite) SetUpSuite(c *C)
func (*ManagerTestSuite) SetUpTest ¶
func (t *ManagerTestSuite) SetUpTest(c *C)
func (*ManagerTestSuite) TearDownSuite ¶
func (t *ManagerTestSuite) TearDownSuite(c *C)
type StartError ¶
type StartError int
func (StartError) Error ¶
func (err StartError) Error() string
Click to show internal directories.
Click to hide internal directories.