structs

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2018 License: GPL-3.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireHeaderInt64

func RequireHeaderInt64(md metadata.MD, name string) (int64, error)

Types

type DealID added in v0.4.1

type DealID string

func (DealID) String added in v0.4.1

func (id DealID) String() string

type ImagePush

type ImagePush struct {
	sonm.Worker_PushTaskServer
	// contains filtered or unexported fields
}

func NewImagePush

func NewImagePush(stream sonm.Worker_PushTaskServer) (*ImagePush, error)

func (*ImagePush) DealId

func (p *ImagePush) DealId() string

func (*ImagePush) ImageSize

func (p *ImagePush) ImageSize() int64

type Network added in v0.4.1

type Network interface {
	// ID returns a unique identifier that will be used as a new network name.
	ID() string
	// NetworkType returns a network driver name used to establish networking.
	NetworkType() string
	// NetworkOptions return configuration map, passed directly to network driver, this map should not be mutated.
	NetworkOptions() map[string]string
	// Returns network subnet in CIDR notation if applicable.
	NetworkCIDR() string
	// Returns specified addr to join the network.
	NetworkAddr() string
}

func NewNetworkSpecs added in v0.4.1

func NewNetworkSpecs(specs []*sonm.NetworkSpec) ([]Network, error)

type NetworkSpec added in v0.4.1

type NetworkSpec struct {
	*sonm.NetworkSpec
	NetID string
}

func NewNetworkSpec added in v0.4.1

func NewNetworkSpec(spec *sonm.NetworkSpec) (*NetworkSpec, error)

func (*NetworkSpec) ID added in v0.4.1

func (n *NetworkSpec) ID() string

func (*NetworkSpec) NetworkAddr added in v0.4.1

func (n *NetworkSpec) NetworkAddr() string

func (*NetworkSpec) NetworkCIDR added in v0.4.1

func (n *NetworkSpec) NetworkCIDR() string

func (*NetworkSpec) NetworkOptions added in v0.4.1

func (n *NetworkSpec) NetworkOptions() map[string]string

func (*NetworkSpec) NetworkType added in v0.4.1

func (n *NetworkSpec) NetworkType() string

Jump to

Keyboard shortcuts

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