adapter

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const CPU_SHARES = 1000000000
View Source
const DEFAULT_NGINX_CONFIG = `` /* 661-byte string literal not displayed */
View Source
const DOCKER_API_VERSION = "1.40"
View Source
const LOCAL_DRIVER = "local"
View Source
const MEGABYTE = 1024 * 1024
View Source
const NGINX_CONF = "nginx.conf"
View Source
const ORBS_BLOCKS_TARGET = "/usr/local/var/orbs"
View Source
const ORBS_LOGS_TARGET = "/opt/orbs/logs"
View Source
const PROXY_CONTAINER_NAME = "http-api-reverse-proxy"
View Source
const REXRAY_EBS_DRIVER = "rexray/ebs"
View Source
const SHARED_SIGNER_NETWORK = "signer-overlay"
View Source
const SSL_CERT = "ssl-cert"
View Source
const SSL_KEY = "ssl-key"
View Source
const VCHAINS_CONF = "vchains.conf"

Variables

This section is empty.

Functions

func GetServiceId added in v0.14.0

func GetServiceId(input string) string

func GetSysctls added in v0.14.0

func GetSysctls() map[string]string

Types

type AppConfig

type AppConfig struct {
	KeyPair []byte
	Network []byte
	Config  []byte
}

type ContainerStatus

type ContainerStatus struct {
	Name   string
	NodeID string
	State  string
	Error  string

	Logs string

	CreatedAt time.Time
}

type Orchestrator

type Orchestrator interface {
	PullImage(ctx context.Context, imageName string) error
	Prepare(ctx context.Context, serviceConfig *ServiceConfig, appConfig *AppConfig) (Runner, error)
	RemoveContainer(ctx context.Context, containerName string) error

	PrepareService(ctx context.Context, serviceConfig *ServiceConfig, appConfig *AppConfig) (Runner, error)
	PrepareReverseProxy(ctx context.Context, config *ReverseProxyConfig) (Runner, error)

	GetOverlayNetwork(ctx context.Context, name string) (string, error)

	GetStatus(ctx context.Context) ([]*ContainerStatus, error)

	io.Closer
}

func NewDockerSwarm

func NewDockerSwarm(options OrchestratorOptions) (Orchestrator, error)

type OrchestratorOptions

type OrchestratorOptions struct {
	StorageDriver          string            `json:"storage-driver"`
	StorageOptions         map[string]string `json:"storage-options"`
	MaxReloadTimedDelayStr string            `json:"max-reload-time-delay"`
}

func (OrchestratorOptions) MaxReloadTimedDelay

func (s OrchestratorOptions) MaxReloadTimedDelay() time.Duration

type ReverseProxyConfig added in v0.12.0

type ReverseProxyConfig struct {
	NginxConfig    string
	SSLCertificate []byte
	SSLPrivateKey  []byte
}

type Runner

type Runner interface {
	Run(ctx context.Context) error
}

type SSLOptions added in v0.12.0

type SSLOptions struct {
	SSLCertificatePath string
	SSLPrivateKeyPath  string
}

type ServiceConfig

type ServiceConfig struct {
	Id            uint32
	NodeAddress   string
	ImageName     string
	ContainerName string

	// FIXME rename ports to be less vchain-specific
	HttpPort   int
	GossipPort int

	LimitedMemory  int64
	LimitedCPU     float64
	ReservedMemory int64
	ReservedCPU    float64

	BlocksVolumeSize int
	LogsVolumeSize   int
}

Jump to

Keyboard shortcuts

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