containermessage

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentDescription

type DeploymentDescription struct {
	Services       map[string]*Service `json:"services"`
	ServicePattern Pattern             `json:"service_pattern"`
	Infrastructure bool                `json:"infrastructure"`
	Overrides      map[string]*Service `json:"overrides"`
}

func GetNativeDeployment

func GetNativeDeployment(depStr string) (*DeploymentDescription, error)

Given a deployment string, unmarshal it as a native Horizon Deployment object. It might not be a native Deployment, so we have to verify what was just unmarshalled.

func (DeploymentDescription) IsValidFor

func (d DeploymentDescription) IsValidFor(context string) bool

func (DeploymentDescription) ServiceNames

func (d DeploymentDescription) ServiceNames() []string

type DynamicOutboundPermitValue

type DynamicOutboundPermitValue struct {
	DdKey    string   `json:"dd_key"`
	Encoding Encoding `json:"encoding"`
	Path     string   `json:"path"`
}

func (*DynamicOutboundPermitValue) String

func (d *DynamicOutboundPermitValue) String() string

type Encoding

type Encoding string
const (
	JSON Encoding = "JSON"
)

type NetworkIsolation

type NetworkIsolation struct {
	OutboundPermitOnlyIgnore OutboundPermitOnlyIgnore `json:"outbound_permit_only_ignore"`
	OutboundPermitOnly       []OutboundPermitValue    `json:"outbound_permit_only"`
}

func (*NetworkIsolation) UnmarshalJSON

func (n *NetworkIsolation) UnmarshalJSON(data []byte) error

type OutboundPermitOnlyIgnore

type OutboundPermitOnlyIgnore string
const (
	ETH_ACCT_SPECIFIED OutboundPermitOnlyIgnore = "ETH_ACCT_SPECIFIED"
)

type OutboundPermitValue

type OutboundPermitValue interface{}

type Pattern

type Pattern struct {
	Shared map[string][]string `json:"shared"`
}

func (*Pattern) IsShared

func (p *Pattern) IsShared(tp string, serviceName string) bool

type Port

type Port struct {
	LocalhostOnly   bool   `json:"localhost_only,omitempty"`
	PortAndProtocol string `json:"port_and_protocol"`
}

type Service

type Service struct {
	Image            string               `json:"image"`
	VariationLabel   string               `json:"variation_label,omitempty"`
	Privileged       bool                 `json:"privileged"`
	Environment      []string             `json:"environment,omitempty"`
	CapAdd           []string             `json:"cap_add,omitempty"`
	Command          []string             `json:"command,omitempty"`
	Devices          []string             `json:"devices,omitempty"`
	NetworkIsolation *NetworkIsolation    `json:"network_isolation,omitempty"` // Changed to pointer so that the hzn dev CLI doesnt generate this struct into the deployment config skeleton
	Binds            []string             `json:"binds,omitempty"`
	Tmpfs            map[string]string    `json:"tmpfs,omitempty"`
	Ports            []docker.PortBinding `json:"ports,omitempty"`
	EphemeralPorts   []Port               `json:"ephemeral_ports,omitempty"`
	SpecificPorts    []docker.PortBinding `json:"specific_ports,omitempty"` // obselete. for backward compatibility only, new way should use ports instead.
}

Service Only those marked "omitempty" may be omitted

func (*Service) AddFilesystemBinding

func (s *Service) AddFilesystemBinding(bind string)

func (*Service) AddSpecificPortBinding

func (s *Service) AddSpecificPortBinding(b docker.PortBinding)

func (*Service) GetSpecificContainerPortBinding

func (s *Service) GetSpecificContainerPortBinding() string

func (*Service) GetSpecificHostBinding

func (s *Service) GetSpecificHostBinding() string

func (*Service) GetSpecificHostPortBinding

func (s *Service) GetSpecificHostPortBinding() string

func (*Service) HasSpecificPortBinding

func (s *Service) HasSpecificPortBinding() bool

type StaticOutboundPermitValue

type StaticOutboundPermitValue string

Jump to

Keyboard shortcuts

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