container

package
v0.0.0-...-4862416 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const IPT_COLONUS_ISOLATED_CHAIN = "OPENHORIZON-ANAX-ISOLATION"
View Source
const LABEL_PREFIX = "openhorizon.anax"
View Source
const T_CONFIGURE = "CONFIGURE"

Variables

This section is empty.

Functions

func ProcessTar

func ProcessTar(file string) (string, error)

Types

type Configure

type Configure struct {
	// embedded
	WhisperProviderMsg
	ConfigureNonce      string  `json:"configure_nonce"`
	TorrentURL          url.URL `json:"torrent_url"`
	Deployment          string  `json:"deployment"` // JSON docker-compose like
	DeploymentSignature string  `json:"deployment_signature"`
	DeploymentUserInfo  string  `json:"deployment_user_info"`
}

message sent to contract owner from provider

func NewConfigure

func NewConfigure(configureNonce string, torrentURL url.URL, deployment string, deploymentSignature string, deploymentUserInfo string) *Configure

func (Configure) String

func (c Configure) String() string

type ContainerConfigureCommand

type ContainerConfigureCommand struct {
	DeploymentDescription  *containermessage.DeploymentDescription
	ContainerLaunchContext *events.ContainerLaunchContext
}

==============================================================================================================

func (ContainerConfigureCommand) ShortString

func (c ContainerConfigureCommand) ShortString() string

func (ContainerConfigureCommand) String

func (c ContainerConfigureCommand) String() string

type ContainerMaintenanceCommand

type ContainerMaintenanceCommand struct {
	AgreementProtocol string
	AgreementId       string
	Deployment        persistence.DeploymentConfig
}

==============================================================================================================

func (ContainerMaintenanceCommand) ShortString

func (c ContainerMaintenanceCommand) ShortString() string

func (ContainerMaintenanceCommand) String

type ContainerStopCommand

type ContainerStopCommand struct {
	Msg events.ContainerStopMessage
}

==============================================================================================================

func (ContainerStopCommand) ShortString

func (c ContainerStopCommand) ShortString() string

func (ContainerStopCommand) String

func (c ContainerStopCommand) String() string

type ContainerWorker

type ContainerWorker struct {
	worker.BaseWorker // embedded field
	// contains filtered or unexported fields
}

func CreateCLIContainerWorker

func CreateCLIContainerWorker(config *config.HorizonConfig) (*ContainerWorker, error)

func NewContainerWorker

func NewContainerWorker(name string, config *config.HorizonConfig, db *bolt.DB) *ContainerWorker

func (*ContainerWorker) CommandHandler

func (b *ContainerWorker) CommandHandler(command worker.Command) bool

func (*ContainerWorker) ContainersMatchingAgreement

func (b *ContainerWorker) ContainersMatchingAgreement(agreements []string, includeShared bool, fn func(*docker.APIContainers, string) error) error

func (*ContainerWorker) GetClient

func (cw *ContainerWorker) GetClient() *docker.Client

func (*ContainerWorker) Initialize

func (b *ContainerWorker) Initialize() bool

func (*ContainerWorker) Messages

func (w *ContainerWorker) Messages() chan events.Message

func (*ContainerWorker) NewContainerConfigureCommand

func (b *ContainerWorker) NewContainerConfigureCommand(deploymentDescription *containermessage.DeploymentDescription, containerLaunchContext *events.ContainerLaunchContext) *ContainerConfigureCommand

func (*ContainerWorker) NewContainerMaintenanceCommand

func (b *ContainerWorker) NewContainerMaintenanceCommand(protocol string, agreementId string, deployment persistence.DeploymentConfig) *ContainerMaintenanceCommand

func (*ContainerWorker) NewContainerStopCommand

func (b *ContainerWorker) NewContainerStopCommand(msg *events.ContainerStopMessage) *ContainerStopCommand

func (*ContainerWorker) NewEvent

func (w *ContainerWorker) NewEvent(incoming events.Message)

func (*ContainerWorker) NewMaintainMicroserviceCommand

func (b *ContainerWorker) NewMaintainMicroserviceCommand(key string) *MaintainMicroserviceCommand

func (*ContainerWorker) NewShutdownMicroserviceCommand

func (b *ContainerWorker) NewShutdownMicroserviceCommand(key string) *ShutdownMicroserviceCommand

func (*ContainerWorker) NewWorkloadConfigureCommand

func (b *ContainerWorker) NewWorkloadConfigureCommand(deploymentDescription *containermessage.DeploymentDescription, agreementLaunchContext *events.AgreementLaunchContext) *WorkloadConfigureCommand

func (*ContainerWorker) NewWorkloadShutdownCommand

func (b *ContainerWorker) NewWorkloadShutdownCommand(protocol string, currentAgreementId string, deployment persistence.DeploymentConfig, agreements []string) *WorkloadShutdownCommand

func (*ContainerWorker) ResourcesCreate

func (b *ContainerWorker) ResourcesCreate(agreementId string, agreementProtocol string, configure *events.ContainerConfig, deployment *containermessage.DeploymentDescription, configureRaw []byte, environmentAdditions map[string]string, ms_networks map[string]docker.ContainerNetwork) (persistence.DeploymentConfig, error)

func (*ContainerWorker) ResourcesRemove

func (b *ContainerWorker) ResourcesRemove(agreements []string) error

type MaintainMicroserviceCommand

type MaintainMicroserviceCommand struct {
	MsInstKey string // the name that was passed into the ContainerLaunchContext, it is the key to the MicroserviceInstance table.
}

==============================================================================================================

func (MaintainMicroserviceCommand) ShortString

func (c MaintainMicroserviceCommand) ShortString() string

type ShutdownMicroserviceCommand

type ShutdownMicroserviceCommand struct {
	MsInstKey string // key to the MicroserviceInstance table.
}

==============================================================================================================

func (ShutdownMicroserviceCommand) ShortString

func (c ShutdownMicroserviceCommand) ShortString() string

type WhisperProviderMsg

type WhisperProviderMsg struct {
	Type string `json:"type"`
}

type WorkloadConfigureCommand

type WorkloadConfigureCommand struct {
	DeploymentDescription  *containermessage.DeploymentDescription
	AgreementLaunchContext *events.AgreementLaunchContext
}

==============================================================================================================

func (WorkloadConfigureCommand) ShortString

func (c WorkloadConfigureCommand) ShortString() string

func (WorkloadConfigureCommand) String

func (c WorkloadConfigureCommand) String() string

type WorkloadShutdownCommand

type WorkloadShutdownCommand struct {
	AgreementProtocol  string
	CurrentAgreementId string
	Deployment         persistence.DeploymentConfig
	Agreements         []string
}

==============================================================================================================

func (WorkloadShutdownCommand) ShortString

func (c WorkloadShutdownCommand) ShortString() string

func (WorkloadShutdownCommand) String

func (c WorkloadShutdownCommand) String() string

Jump to

Keyboard shortcuts

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