Documentation
¶
Overview ¶
Package setup is a package which exposes the commands externally to the compiled binaries.
Index ¶
- func GetNetwork(s networktypes.Inspect, c networktypes.Inspect) networktypes.Inspect
- func GetService(s dockerruntime.Service, c dockerruntime.Service) dockerruntime.Service
- func GetServicesSorted(ctx context.Context, cli *client.Client, c *Config) []string
- func GetVolume(s volumetypes.Volume, c volumetypes.Volume) volumetypes.Volume
- func ImportDefaults(ctx context.Context, cli *client.Client, c *Config, service string, ...) bool
- func Setup(ctx context.Context, cli *client.Client, c *Config)
- func Unique(stringSlice []string) []string
- type CompatibilityCheck
- type Config
- type Key
- type StatusJSON
- type StatusJSONStatus
- type StatusJSONURLValidation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNetwork ¶
func GetNetwork(s networktypes.Inspect, c networktypes.Inspect) networktypes.Inspect
GetNetwork will return a network from the configuration. This merges the information down to return the object, so it cannot be implemented in the networks package.
func GetService ¶
func GetService(s dockerruntime.Service, c dockerruntime.Service) dockerruntime.Service
GetService will return a service from the configuration. This merges the information down to return the object, so it cannot be implemented in the another package.
func GetServicesSorted ¶
GetServicesSorted will return a list of services as plain text. due to some weirdness the ssh agent must be the first value.
func GetVolume ¶
func GetVolume(s volumetypes.Volume, c volumetypes.Volume) volumetypes.Volume
GetVolume will return a volume from the configuration. This merges the information down to return the object, so it cannot be implemented in the volumes package.
func ImportDefaults ¶
func ImportDefaults(ctx context.Context, cli *client.Client, c *Config, service string, importer dockerruntime.Service) bool
ImportDefaults is an exported function which allows third-party applications to provide their own *Service and integrate it with their application so that Pygmy is more extendable via API. It's here so that we have one common import functionality that respects the users' decision to import config defaults in a centralized way.
Types ¶
type CompatibilityCheck ¶
CompatibilityCheck is a struct of fields associated to reporting of a result state.
type Config ¶
type Config struct { // Keys are the paths to the Keys which should be added. Keys []Key `yaml:"keys"` // Domain is the default domain suffix to use. Domain string `yaml:"domain"` // TLSCertPath is the path to the TLS certificate to use with the Pygmy haproxy. TLSCertPath string `yaml:"tlsCertPath"` // Services is a []model.Service for an index of all Services. Services map[string]dockerruntime.Service `yaml:"services"` SortedServices []string // Networks is for network configuration Networks map[string]networktypes.Inspect `yaml:"networks"` // NoDefaults will prevent default configuration items. Defaults bool // JSONFormat indicates the `status` command should print to stdout in JSON format. JSONFormat bool // JSONStatus contains JSON status content. JSONStatus StatusJSON // ResolversDisabled will disable the creation of any resolv configurations. ResolversDisabled bool `yaml:"resolversDisabled"` // Resolvers is for all resolvers Resolvers []resolv.Resolv `yaml:"resolvers"` // Volumes will ensure names volumes are created Volumes map[string]volumetypes.Volume }
Config is a struct of configurable options which can be passed to package library to configure logic for continued abstraction.
type StatusJSON ¶
type StatusJSON struct { PortAvailability []string `json:"port_availability"` Services map[string]StatusJSONStatus `json:"service_status"` Networks []string `json:"networks"` Resolvers []string `json:"resolvers"` Volumes []string `json:"volumes"` SSHMessages []string `json:"ssh_messages"` URLValidations []StatusJSONURLValidation `json:"url_validations"` }