swarmkit

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

func AllNodesFilter

func AllNodesFilter(n *api.Node) bool

func Context

func Context() context.Context

func DefaultSocket

func DefaultSocket() string

/var/run/docker/swarm/control.sock

func Dial

func Dial(addr string) (api.ControlClient, *grpc.ClientConn, error)

Dial establishes a connection and creates a client.

func DialConn

func DialConn(addr string) (*grpc.ClientConn, error)

DialConn establishes a connection to SwarmKit.

func LiveNodesFilter

func LiveNodesFilter(n *api.Node) bool

func NewWatchRequest

func NewWatchRequest(entries []*api.WatchRequest_WatchEntry, resumeFrom *api.Version, includeOldObject bool) *api.WatchRequest

func NewWatchRequestEntry

func NewWatchRequestEntry(kind string, action api.WatchActionKind, filters []*api.SelectBy) *api.WatchRequest_WatchEntry

@param kind node service network task cluster secret resource extension config

@param action WatchActionKindUnknown WatchActionKind = 0 WatchActionKindCreate WatchActionKind = 1 WatchActionKindUpdate WatchActionKind = 2 WatchActionKindRemove WatchActionKind = 4

@param filters SelectBy { By: } Types that are valid to be assigned to SelectBy.By

*SelectBy_ID
*SelectBy_IDPrefix
*SelectBy_Name
*SelectBy_NamePrefix
*SelectBy_Custom
*SelectBy_CustomPrefix
*SelectBy_ServiceID
*SelectBy_NodeID
*SelectBy_Slot
*SelectBy_DesiredState
*SelectBy_Role
*SelectBy_Membership
*SelectBy_ReferencedNetworkID
*SelectBy_ReferencedSecretID
*SelectBy_ReferencedConfigID
*SelectBy_Kind

Types

type NodeFilter

type NodeFilter func(n *api.Node) bool

type NodeMap

type NodeMap map[string]*api.Node

func ListNodes

func ListNodes(ctx context.Context, c api.ControlClient, filter NodeFilter) (NodeMap, error)

Jump to

Keyboard shortcuts

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