cmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Types

type Container

type Container struct {
	ID    string
	Image string
	State string
}

Container is a Docker container

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 Network

type Network struct {
	Attachable bool
	Created    string
	ID         string
	Internal   bool
	Name       string
}

Network is a Docker network

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

type Portainer struct {
	URL string

	Endpoints []Endpoint
	// contains filtered or unexported fields
}

Portainer is an instance of Portainer

func NewPortainer

func NewPortainer() Portainer

NewPortainer returns a new Portainer instance

type Service

type Service struct {
	ID      string
	Version struct {
		Index int
	}
	Spec struct {
		Name string
		Mode struct {
			Replicated struct {
				Replicas int
			}
			Global string
		}
		Labels       map[string]string
		TaskTemplate struct {
			ContainerSpec struct {
				Env []string
			}
		}
	}
}

Service is a Docker service

type Task

type Task struct {
	Name      string
	ServiceID string
	NodeID    string
	Status    struct {
		State   string
		Message string
	}
	DesiredState string
}

Task is a Docker task

Jump to

Keyboard shortcuts

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