rancher

package
v0.0.0-...-b52e348 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (

	// DefaultRegistry is the default registry for docker (public)
	DefaultRegistry = "https://hub.docker.com"

	DefaultProvider = "rancher"

	DefaultRancherZone = "India"
	// DefaultNamespace is the default highlevel namespace(userid) under the registry eg: https://hub.docker.com/megam
	DefaultNamespace = "megam"

	// DefaultMemSize is the default memory size in MB used for every container launch
	DefaultMemSize = 256 * 1024 * 1024

	// DefaultSwapSize is the default memory size in MB used for every container launch
	DefaultSwapSize = 210 * 1024 * 1024

	// DefaultCPUPeriod is the default cpu period used for every container launch in ms
	DefaultCPUPeriod = 25000 * time.Millisecond

	// DefaultCPUQuota is the default cpu quota allocated for every cpu cycle for the launched container in ms
	DefaultCPUQuota = 25000 * time.Millisecond

	// DefaultOneZone is the default zone for the IaaS service.
	// Access credentials for radosgw
	DefaultAccessKey = "vertadmin"
	DefaultSecretKey = "vertadmin"

	// DefaultSwarmEndpoint is the default address that the service binds to an IaaS (Swarm).
	DefaultRancherEndpoint = "http://localhost:8080"
)
View Source
const (
	TOPIC = "containers"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Provider string          `json:"provider" toml:"provider"`
	Rancher  rancher.Rancher `json:"container" toml:"container"`
}

func NewConfig

func NewConfig() *Config

func (Config) String

func (c Config) String() string

type Handler

type Handler struct {
	Provider string
	D        *Config
}

func NewHandler

func NewHandler(c *Config) *Handler

NewHandler returns a new instance of handler with routes.

type Service

type Service struct {
	Handler  *Handler
	Consumer *nsq.Consumer
	Meta     *meta.Config
	Rancherd *Config
	// contains filtered or unexported fields
}

Service manages the listener and handler for an HTTP endpoint.

func NewService

func NewService(c *meta.Config, d *Config) *Service

NewService returns a new instance of Service.

func (*Service) Close

func (s *Service) Close() error

Close closes the underlying subscribe channel.

func (*Service) Err

func (s *Service) Err() <-chan error

Err returns a channel for fatal errors that occur on the listener.

func (*Service) Open

func (s *Service) Open() error

Open starts the service

Jump to

Keyboard shortcuts

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