Documentation
¶
Index ¶
- Variables
- type Error
- type ExternalRegistry
- type ExternalRegistryID
- type ExternalRegistryIndex
- type ExternalRegistryPOST
- type Grid
- type GridDefaultAffinity
- type GridLogs
- type GridLogsOpts
- type GridPOST
- type GridPUT
- type GridStats
- type GridStatsStatsd
- type GridTrustedSubnets
- type Grids
- type GridsGET
- type Node
- type NodeID
- type NodeLabels
- type NodePOST
- type NodePUT
- type NodeToken
- type NodeTokenDELETE
- type NodeTokenPUT
- type NodeTokenParams
- type Nodes
- type NodesGET
- type Ping
- type User
- type UserRole
Constants ¶
This section is empty.
Variables ¶
View Source
var ExternalRegistryIDRegexp = regexp.MustCompile(`^([a-z0-9_-]+)/(.+)$`)
View Source
var NodeIDRegexp = regexp.MustCompile(`^([a-z0-9_-]+)/([a-z0-9_-]+)$`)
Functions ¶
This section is empty.
Types ¶
type ExternalRegistry ¶
type ExternalRegistry struct { ID ExternalRegistryID Name string URL string Username string Email string }
type ExternalRegistryID ¶
func ParseExternalRegistryID ¶
func ParseExternalRegistryID(str string) (id ExternalRegistryID, err error)
func (ExternalRegistryID) MarshalJSON ¶
func (id ExternalRegistryID) MarshalJSON() ([]byte, error)
func (ExternalRegistryID) String ¶
func (id ExternalRegistryID) String() string
func (*ExternalRegistryID) UnmarshalJSON ¶
func (id *ExternalRegistryID) UnmarshalJSON(buf []byte) error
type ExternalRegistryIndex ¶
type ExternalRegistryIndex struct {
ExternalRegistries []ExternalRegistry `json:"external_registries"`
}
type ExternalRegistryPOST ¶
type Grid ¶
type Grid struct { ID string Name string InitialSize int `json:"initial_size"` Token string Stats GridStats DefaultAffinity GridDefaultAffinity `json:"default_affinity,omitempty"` TrustedSubnets GridTrustedSubnets `json:"trusted_subnets"` Subnet string Supernet string Logs *GridLogs NodeCount int `json:"node_count"` ServiceCount int `json:"service_count"` ContainerCount int `json:"container_count"` UserCount int `json:"user_count"` }
type GridDefaultAffinity ¶
type GridDefaultAffinity []string
type GridLogs ¶
type GridLogs struct { Forwarder string `json:"forwarder"` Opts GridLogsOpts `json:"opts"` }
type GridLogsOpts ¶
type GridPOST ¶
type GridPOST struct { // Required Name string `json:"name"` InitialSize int `json:"initial_size"` // Optional Token string `json:"token,omitempty"` Subnet string `json:"subnet,omitempty"` Supernet string `json:"supernet,omitempty"` // Optional TrustedSubnets *GridTrustedSubnets `json:"trusted_subnets,omitempty"` DefaultAffinity *GridDefaultAffinity `json:"default_affinity,omitempty"` Stats *GridStats `json:"stats,omitempty"` Logs *GridLogs `json:"logs,omitempty"` }
type GridPUT ¶
type GridPUT struct { // Optional TrustedSubnets *GridTrustedSubnets `json:"trusted_subnets,omitempty"` DefaultAffinity *GridDefaultAffinity `json:"default_affinity,omitempty"` Stats *GridStats `json:"stats,omitempty"` Logs *GridLogs `json:"logs,omitempty"` }
type GridStats ¶
type GridStats struct {
Statsd *GridStatsStatsd `json:"statsd"`
}
type GridStatsStatsd ¶
type GridTrustedSubnets ¶
type GridTrustedSubnets []string
type Node ¶
type Node struct { ID NodeID // grid/name NodeID string `json:"node_id"` // Docker ID Connected bool CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` ConnectedAt time.Time `json:"connected_at"` LastSeenAt time.Time `json:"last_seen_at"` Name string OS string EngineRootDir string `json:"engine_root_dir"` Driver string // network_drivers // volume_drivers KernelVersion string `json:"kernel_version"` Labels NodeLabels MemTotal int `json:"mem_total"` MemLimit int `json:"mem_limit"` CPUs int PublicIP string `json:"public_ip"` PrivateIP string `json:"private_ip"` OverlayIP string `json:"overlay_ip"` AgentVersion string `json:"agent_version"` DockerVersion string `json:"docker_version"` PeerIPs []string `json:"peer_ips"` NodeNumber int `json:"node_number"` InitialMember bool `json:"initial_member"` Grid Grid }
Node represents a Kontena node, (a virtual or physical machine) which will run the Kontena Agent where services can be deployed.
type NodeLabels ¶
type NodeLabels []string
type NodePOST ¶
type NodePOST struct { Name string `json:"name"` Token string `json:"token,omitempty"` Labels *NodeLabels `json:"labels,omitempty"` }
type NodePUT ¶
type NodePUT struct {
Labels *NodeLabels `json:"labels,omitempty"`
}
type NodeTokenDELETE ¶
type NodeTokenDELETE struct {
NodeTokenParams
}
type NodeTokenPUT ¶
type NodeTokenPUT struct { Token string `json:"token,omitempty"` NodeTokenParams }
type NodeTokenParams ¶
type NodeTokenParams struct {
ResetConnection bool `json:"reset_connection"`
}
Click to show internal directories.
Click to hide internal directories.