domain

package
v0.0.0-...-7dcd5d4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Backend struct {
		ID       string `json:"Id"`
		Type     string `json:"Type"`
		Settings struct {
			Timeouts struct {
				Read         string `json:"Read"`
				Dial         string `json:"Dial"`
				Tlshandshake string `json:"TLSHandshake"`
			} `json:"Timeouts"`
			Keepalive struct {
				Period              string `json:"Period"`
				Maxidleconnsperhost int    `json:"MaxIdleConnsPerHost"`
			} `json:"KeepAlive"`
		} `json:"Settings"`
	} `json:"Backend"`
}

type Config

type Config struct {
	DockerAPIEndpoint  string
	VulcandAPIEndpoint string
	HostIP             string
}

func (*Config) InstallFlags

func (config *Config) InstallFlags()

type Container

type Container struct {
	Command string   `json:"Command"`
	Created int      `json:"Created"`
	ID      string   `json:"Id"`
	Image   string   `json:"Image"`
	Names   []string `json:"Names"`
	Ports   []struct {
		IP          string `json:"IP"`
		PrivatePort int    `json:"PrivatePort"`
		PublicPort  int    `json:"PublicPort"`
		Type        string `json:"Type"`
	} `json:"Ports"`
	Status string `json:"Status"`
}

type DockerAPIClientManager

type DockerAPIClientManager struct {
	InjectedDockerAPIClientManager IDockerAPIClientManager
}

func (*DockerAPIClientManager) ListContainers

func (manager *DockerAPIClientManager) ListContainers(socketPath string) ([]*Container, error)

type Frontend

type Frontend struct {
	ID        string `json:"Id"`
	Route     string `json:"Route"`
	Type      string `json:"Type"`
	Backendid string `json:"BackendId"`
	Settings  struct {
		Limits struct {
			Maxmembodybytes int `json:"MaxMemBodyBytes"`
			Maxbodybytes    int `json:"MaxBodyBytes"`
		} `json:"Limits"`
		Failoverpredicate  string `json:"FailoverPredicate"`
		Hostname           string `json:"Hostname"`
		Trustforwardheader bool   `json:"TrustForwardHeader"`
	} `json:"Settings"`
}

type IDockerAPIClientManager

type IDockerAPIClientManager interface {
	ListContainers(socketPath string) ([]*Container, error)
}

type IVulcandAPIClientManager

type IVulcandAPIClientManager interface {
	GetBackendById(apiUrl, backendId string) (*Backend, error)
	GetServerById(apiUrl, backendId, serverId string) (*Server, error)
	GetFrontendById(apiUrl, frontendId string) (*Frontend, error)
	ListBackends(apiUrl string) ([]*Backend, error)
	ListServers(apiUrl, backendId string) ([]*Server, error)
	ListFrontends(apiUrl string) ([]*Frontend, error)
	UpsertBackend(apiUrl string, backend *Backend) (*Backend, error)
	UpsertServer(apiUrl, backendId string, server *Server) (*Server, error)
	DeleteBackendById(apiUrl, backendId string) error
}

type Server

type Server struct {
	Server struct {
		ID  string `json:"Id"`
		URL string `json:"URL"`
	} `json:"Server"`
	TTL string `json:"TTL"`
}

type VulcandAPIClientManager

type VulcandAPIClientManager struct {
	InjectedVulcandAPIClientManager IVulcandAPIClientManager
}

func (*VulcandAPIClientManager) DeleteBackendById

func (manager *VulcandAPIClientManager) DeleteBackendById(apiUrl, backendId string) error

func (*VulcandAPIClientManager) GetBackendById

func (manager *VulcandAPIClientManager) GetBackendById(apiUrl, backendId string) (*Backend, error)

func (*VulcandAPIClientManager) GetFrontendById

func (manager *VulcandAPIClientManager) GetFrontendById(apiUrl, frontendId string) (*Frontend, error)

func (*VulcandAPIClientManager) GetServerById

func (manager *VulcandAPIClientManager) GetServerById(apiUrl, backendId, serverId string) (*Server, error)

func (*VulcandAPIClientManager) ListBackends

func (manager *VulcandAPIClientManager) ListBackends(apiUrl string) ([]*Backend, error)

func (*VulcandAPIClientManager) ListFrontends

func (manager *VulcandAPIClientManager) ListFrontends(apiUrl string) ([]*Frontend, error)

func (*VulcandAPIClientManager) ListServers

func (manager *VulcandAPIClientManager) ListServers(apiUrl, backendId string) ([]*Server, error)

func (*VulcandAPIClientManager) UpsertBackend

func (manager *VulcandAPIClientManager) UpsertBackend(apiUrl string, backend *Backend) (*Backend, error)

func (*VulcandAPIClientManager) UpsertServer

func (manager *VulcandAPIClientManager) UpsertServer(apiUrl, backendId string, server *Server) (*Server, error)

Jump to

Keyboard shortcuts

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