 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
	SecurityConfig *ca.SecurityConfig
	// ExternalCAs is a list of initial CAs to which a manager node
	// will make certificate signing requests for node certificates.
	ExternalCAs []*api.ExternalCA
	ProtoAddr map[string]string
	// ProtoListener will be used for grpc serving if it's not nil,
	// ProtoAddr fields will be used to create listeners otherwise.
	ProtoListener map[string]net.Listener
	// AdvertiseAddr is a map of addresses to advertise, by protocol.
	AdvertiseAddr string
	// JoinRaft is an optional address of a node in an existing raft
	// cluster to join.
	JoinRaft string
	// Top-level state directory
	StateDir string
	// ForceNewCluster defines if we have to force a new cluster
	// because we are recovering from a backup data directory.
	ForceNewCluster bool
	// ElectionTick defines the amount of ticks needed without
	// leader to trigger a new election
	ElectionTick uint32
	// HeartbeatTick defines the amount of ticks between each
	// heartbeat sent to other members for health-check purposes
	HeartbeatTick uint32
}
    Config is used to tune the Manager.
type Manager ¶
type Manager struct {
	Dispatcher *dispatcher.Dispatcher
	RaftNode *raft.Node
	// contains filtered or unexported fields
}
    Manager is the cluster manager for Swarm. This is the high-level object holding and initializing all the manager subsystems.
func New ¶
New creates a Manager which has not started to accept requests yet.
func (*Manager) Run ¶
Run starts all manager sub-systems and the gRPC server at the configured address. The call never returns unless an error occurs or `Stop()` is called.
TODO(aluzzardi): /!\ This function is *way* too complex. /!\ It needs to be split into smaller manageable functions.
       Source Files
      ¶
      Source Files
      ¶
    
- doc.go
- manager.go
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| Package allocator aims to manage allocation of different cluster-wide resources on behalf of the manager. | Package allocator aims to manage allocation of different cluster-wide resources on behalf of the manager. | 
| Package health provides some utility functions to health-check a server. | Package health provides some utility functions to health-check a server. | 
| Package state provides interfaces to work with swarm cluster state. | Package state provides interfaces to work with swarm cluster state. | 
 Click to show internal directories. 
   Click to hide internal directories.