Documentation ¶
Index ¶
- Constants
- func Clean(ctx context.Context, cli *client.Client, opts CleanOpts) error
- func ComposeBinBytes() ([]byte, error)
- func DownAll(ctx context.Context, cli *client.Client, logger *zap.Logger) error
- func PS(ctx context.Context, depth int, cli *client.Client, logger *zap.Logger) error
- func Prepare(opts PrepareOpts) (string, error)
- func Purge(ctx context.Context, cli *client.Client, logger *zap.Logger) error
- func Up(ctx context.Context, cli *client.Client, opts UpOpts) (map[string]Service, error)
- type CleanOpts
- type ContainersInfo
- type PathwarConfig
- type PrepareOpts
- type Service
- type UpOpts
Constants ¶
View Source
const ( NginxContainerName = "pathwar-agent-nginx" ProxyNetworkName = "pathwar-proxy-network" )
View Source
const (
InstanceKeyLabel = labelPrefix + "instance-key"
)
Variables ¶
This section is empty.
Functions ¶
func Clean ¶
Clean can cleanup specific containers, all the images, all the volumes, and the pathwar's nginx front-end
func ComposeBinBytes ¶ added in v2.75.0
func DownAll ¶
DownAll cleans up everything related to Pathwar except images (containers, volumes, networks)
func Prepare ¶
func Prepare(opts PrepareOpts) (string, error)
Types ¶
type CleanOpts ¶
type CleanOpts struct { ContainerIDs []string RemoveImages bool RemoveVolumes bool RemoveNginx bool Logger *zap.Logger }
func NewCleanOpts ¶
func NewCleanOpts() CleanOpts
type ContainersInfo ¶
type ContainersInfo struct { RunningFlavors map[string]challengeFlavors RunningContainers map[string]container NginxContainer container NginxNetwork types.NetworkResource }
func GetContainersInfo ¶
type PathwarConfig ¶
type PrepareOpts ¶
type PrepareOpts struct { ChallengeDir string Prefix string NoPush bool JSON bool Version string Logger *zap.Logger }
func NewPrepareOpts ¶
func NewPrepareOpts() PrepareOpts
type Service ¶
type Service struct { ContainerName string `yaml:"container_name,omitempty"` Image string `yaml:",omitempty"` Networks, Ports, Expose, Volumes, Command []string `yaml:",omitempty"` VolumesFrom []string `yaml:"volumes_from,omitempty"` DependsOn []string `yaml:"depends_on,omitempty"` CapAdd []string `yaml:"cap_add,omitempty"` Build string `yaml:",omitempty"` Entrypoint []string `yaml:",omitempty"` Restart string `yaml:",omitempty"` Environment map[string]string `yaml:",omitempty"` Labels map[string]string `yaml:"labels,omitempty"` Links []string `yaml:"links,omitempty"` }
func (Service) ChallengeID ¶
Click to show internal directories.
Click to hide internal directories.