container

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultStopGracePeriod is the default timeout value between stopping a container and killing it.
	DefaultStopGracePeriod = 10 * time.Second

	// DefaultMaximumRetryCount is the default number of time to restart the container if it crashes.
	DefaultMaximumRetryCount = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Container added in v0.2.0

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

Container starts and stops the MESG Service in Docker Container.

func New added in v0.2.0

func New(engineName, engineAddress, engineNetwork string, maximumRetryCount int, stopGracePeriod time.Duration) (*Container, error)

New initializes the Container struct by connecting creating the Docker client.

func (*Container) Build added in v0.2.0

func (c *Container) Build(srvHash hash.Hash, path string) error

Build the imge of the container

func (*Container) Download added in v0.23.0

func (c *Container) Download(url string) (string, error)

Download downloads the tarball of the source of a service from a HTTP url. Don't forget to remove the downloaded service.

func (*Container) Start added in v0.21.0

func (c *Container) Start(srv *service.Service, instanceHash, runnerHash, instanceEnvHash hash.Hash, instanceEnv []string, registerPayload []byte) (err error)

Start starts the service.

func (*Container) Stop added in v0.21.0

func (c *Container) Stop(srv *service.Service, runnerHash hash.Hash) error

Stop stops an instance.

Jump to

Keyboard shortcuts

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