Documentation
¶
Index ¶
- Variables
- func Execute()
- func GenCtState(endpoints []Endpoint) error
- func GetPorts(ports string) (string, string)
- func GetRandomPort() string
- func MakeEdName(edName string) string
- func MakeEnvDeployName(env string) string
- func MakeEnvName(env string) string
- func MakeRange(min, max int) []int
- func RandomSl(n int, sl []int) []int
- func ReadToken() string
- func UpdateGwx(svcName string, nodes []string, gwEnv string) error
- func WriteToken(token string) error
- type Container
- type Endpoint
- type Network
- type Node
- type Portainer
- func (p *Portainer) CreateCt(eId int, imgName string, cName string, cPort string, hostPort string) (string, error)
- func (p *Portainer) DeployCt(eId int, cName string, imgName string, cPort string, hostPort string, ...) string
- func (p Portainer) Post(data map[string]interface{}, path string) bool
- func (p *Portainer) PullImage(eId int, imageName string) bool
- func (p *Portainer) RmCt(eId int, cName string)
- func (p *Portainer) StartCt(eId int, cId string, esName string) bool
- func (p *Portainer) StopCt()
- type Scale
- type Scalex
- type Service
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var CtState map[string]string
容器的运行状态
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GenCtState ¶
func GetRandomPort ¶
func GetRandomPort() string
func MakeEdName ¶
func MakeEnvDeployName ¶
func MakeEnvName ¶
func WriteToken ¶
Types ¶
type Endpoint ¶
type Endpoint struct { ID int Name string Containers []Container Networks []Network Services []Service Tasks []Task Nodes []Node }
Endpoint is a Docker Swarm endpoint
type Node ¶
type Node struct { ID string Spec struct { Role string Availability string } Description struct { Hostname string } Status struct { State string Addr string } ManagerStatus struct { Reachability string Addr string } }
Node is a Docker Swarm node (manager or worker)
type Portainer ¶
Portainer is an instance of Portainer
Source Files
¶
- api.go
- common.go
- container.go
- containers.go
- createContainerMap.go
- deploy.go
- deployContainers.go
- endpoint.go
- endpoints.go
- getDeployLog.go
- getLog.go
- listContainers.go
- listDeploy.go
- listEndpoints.go
- listLabels.go
- listNetworks.go
- listNodes.go
- listServices.go
- listVariables.go
- log.go
- logs.go
- network.go
- networks.go
- node.go
- nodes.go
- portainer.go
- publicizeNetworks.go
- publicizeServices.go
- restartService.go
- root.go
- scale.go
- service.go
- services.go
- svcDeploy.go
- tasks.go
- updateService.go
- version.go
Click to show internal directories.
Click to hide internal directories.