Documentation
¶
Index ¶
- Constants
- func ProcessTar(file string) (string, error)
- type Configure
- type ContainerConfigureCommand
- type ContainerMaintenanceCommand
- type ContainerStopCommand
- type ContainerWorker
- func (b *ContainerWorker) CommandHandler(command worker.Command) bool
- func (b *ContainerWorker) ContainersMatchingAgreement(agreements []string, includeShared bool, ...) error
- func (cw *ContainerWorker) GetClient() *docker.Client
- func (b *ContainerWorker) Initialize() bool
- func (w *ContainerWorker) Messages() chan events.Message
- func (b *ContainerWorker) NewContainerConfigureCommand(deploymentDescription *containermessage.DeploymentDescription, ...) *ContainerConfigureCommand
- func (b *ContainerWorker) NewContainerMaintenanceCommand(protocol string, agreementId string, deployment persistence.DeploymentConfig) *ContainerMaintenanceCommand
- func (b *ContainerWorker) NewContainerStopCommand(msg *events.ContainerStopMessage) *ContainerStopCommand
- func (w *ContainerWorker) NewEvent(incoming events.Message)
- func (b *ContainerWorker) NewMaintainMicroserviceCommand(key string) *MaintainMicroserviceCommand
- func (b *ContainerWorker) NewShutdownMicroserviceCommand(key string) *ShutdownMicroserviceCommand
- func (b *ContainerWorker) NewWorkloadConfigureCommand(deploymentDescription *containermessage.DeploymentDescription, ...) *WorkloadConfigureCommand
- func (b *ContainerWorker) NewWorkloadShutdownCommand(protocol string, currentAgreementId string, ...) *WorkloadShutdownCommand
- func (b *ContainerWorker) ResourcesCreate(agreementId string, agreementProtocol string, ...) (persistence.DeploymentConfig, error)
- func (b *ContainerWorker) ResourcesRemove(agreements []string) error
- type MaintainMicroserviceCommand
- type ShutdownMicroserviceCommand
- type WhisperProviderMsg
- type WorkloadConfigureCommand
- type WorkloadShutdownCommand
Constants ¶
const IPT_COLONUS_ISOLATED_CHAIN = "OPENHORIZON-ANAX-ISOLATION"
const LABEL_PREFIX = "openhorizon.anax"
const T_CONFIGURE = "CONFIGURE"
Variables ¶
This section is empty.
Functions ¶
func ProcessTar ¶
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 ¶
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 ¶
func (c ContainerMaintenanceCommand) String() 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