strelets

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROVISION_VCHAIN_MAX_TRIES       = 5
	PROVISION_VCHAIN_ATTEMPT_TIMEOUT = 30 * time.Second
	PROVISION_VCHAIN_RETRY_INTERVAL  = 3 * time.Second
)

Variables

This section is empty.

Functions

func Try

func Try(parentContext context.Context, tries int, timeoutPerTry time.Duration, retryInterval time.Duration, f func(ctxWithTimeout context.Context) error) (err error)

Types

type DockerConfig

type DockerConfig struct {
	Image               string
	Tag                 string
	Pull                bool
	ContainerNamePrefix string
	Resources           DockerResources
	Volumes             DockerVolumes
}

func (*DockerConfig) FullImageName

func (c *DockerConfig) FullImageName() string

type DockerResources

type DockerResources struct {
	Limits       Resource
	Reservations Resource
}

type DockerVolumes added in v0.15.0

type DockerVolumes struct {
	Blocks int
	Logs   int
}

In Gb with defaults of 100 and 2

type FederationNode

type FederationNode struct {
	Address string `json:"address"`
	IP      string `json:"ip"`
	Port    int    `json:"port"`
}

type NodeAddress

type NodeAddress string

type Peer

type Peer struct {
	IP   string
	Port int
}

type PeersMap

type PeersMap map[NodeAddress]*Peer

type ProvisionSharedNetworkInput added in v0.14.0

type ProvisionSharedNetworkInput struct {
	Name string
}

type ProvisionVirtualChainInput

type ProvisionVirtualChainInput struct {
	VirtualChain *VirtualChain
	Peers        *PeersMap
	NodeAddress  NodeAddress

	KeyPairConfig []byte `json:"-"` // Prevents key leak via log
}

type RemoveVirtualChainInput

type RemoveVirtualChainInput struct {
	VirtualChain *VirtualChain
}

type Resource

type Resource struct {
	Memory int64
	CPUs   float64
}

type Service added in v0.14.0

type Service struct {
	Port         int
	DockerConfig DockerConfig
	Config       map[string]interface{}
	Disabled     bool
}

func (*Service) InternalEndpoint added in v0.14.0

func (s *Service) InternalEndpoint() string

type Services added in v0.14.0

type Services struct {
	Signer *Service `json:"signer"`
}

func (Services) SignerOn added in v0.14.0

func (s Services) SignerOn() bool

type Strelets

type Strelets interface {
	ProvisionVirtualChain(ctx context.Context, input *ProvisionVirtualChainInput) error
	RemoveVirtualChain(ctx context.Context, input *RemoveVirtualChainInput) error
	UpdateReverseProxy(ctx context.Context, input *UpdateReverseProxyInput) error
	UpdateService(ctx context.Context, input *UpdateServiceInput) error
	ProvisionSharedNetwork(ctx context.Context, input *ProvisionSharedNetworkInput) error
}

func NewStrelets

func NewStrelets(docker adapter.Orchestrator) Strelets

type UpdateReverseProxyInput added in v0.12.0

type UpdateReverseProxyInput struct {
	Chains []*VirtualChain
	IP     string

	SSLOptions adapter.SSLOptions
}

type UpdateServiceInput added in v0.14.0

type UpdateServiceInput struct {
	Service       *Service
	KeyPairConfig []byte `json:"-"` // Prevents possible key leak via log
}

type VirtualChain

type VirtualChain struct {
	Id           VirtualChainId
	HttpPort     int
	GossipPort   int
	DockerConfig DockerConfig
	Config       map[string]interface{}
	Disabled     bool
}

type VirtualChainId

type VirtualChainId uint32

func (VirtualChainId) String

func (id VirtualChainId) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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