plugin

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReloadCaddy

func ReloadCaddy(loader caddy.Loader)

func WrapDockerClient added in v0.2.0

func WrapDockerClient(client *client.Client) *dockerClientWrapper

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

func (*DockerLoader) Load

func (dockerLoader *DockerLoader) Load(serverType string) (caddy.Input, error)

Load returns the current caddy file input

type DockerUtils added in v0.2.0

type DockerUtils interface {
	GetCurrentContainerID() (string, error)
}

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

Directories

Path Synopsis
module

Jump to

Keyboard shortcuts

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