Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReloadCaddy ¶
func WrapDockerClient ¶ added in v0.2.0
Types ¶
type CaddyfileGenerator ¶ added in v0.2.0
type CaddyfileGenerator struct {
// contains filtered or unexported fields
}
CaddyfileGenerator generates caddyfile
func CreateGenerator ¶ added in v0.2.0
func CreateGenerator(dockerClient DockerClient, dockerUtils DockerUtils, options *GeneratorOptions) *CaddyfileGenerator
CreateGenerator creates a new generator
func (*CaddyfileGenerator) GenerateCaddyFile ¶ added in v0.2.0
func (g *CaddyfileGenerator) GenerateCaddyFile() []byte
GenerateCaddyFile generates a caddy file config from docker swarm
type DockerClient ¶ added in v0.2.0
type DockerClient interface { ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) Info(ctx context.Context) (types.Info, error) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) NetworkInspect(ctx context.Context, networkID string, options types.NetworkInspectOptions) (types.NetworkResource, error) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) ConfigInspectWithRaw(ctx context.Context, id string) (swarm.Config, []byte, error) }
DockerClient is an interface with needed functionalities from docker client
type DockerLoader ¶
type DockerLoader struct {
// contains filtered or unexported fields
}
DockerLoader generates caddy files from docker swarm information
func CreateDockerLoader ¶
func CreateDockerLoader() *DockerLoader
CreateDockerLoader creates a docker loader
type DockerUtils ¶ added in v0.2.0
DockerUtils is an interface with docker utilities
func CreateDockerUtils ¶ added in v0.2.0
func CreateDockerUtils() DockerUtils
CreateDockerUtils creates a new instance of docker utils
type GeneratorOptions ¶ added in v0.2.0
type GeneratorOptions struct {
// contains filtered or unexported fields
}
GeneratorOptions are the options for generator
func GetGeneratorOptions ¶ added in v0.2.0
func GetGeneratorOptions() *GeneratorOptions
GetGeneratorOptions creates generator options from cli flags and environment variables
Source Files
¶
Click to show internal directories.
Click to hide internal directories.