api

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2014 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

View Source
const CurrentVersion = "v1"

Variables

This section is empty.

Functions

func InitProxyController

func InitProxyController(backend backend.Backend, stats backend.StatsProvider, app *scroll.App)

Types

type Client

type Client struct {
	Addr     string
	Registry *plugin.Registry
}

func NewClient

func NewClient(addr string, registry *plugin.Registry) *Client

func (*Client) AddEndpoint

func (c *Client) AddEndpoint(upstreamId, id, u string) (*backend.Endpoint, error)

func (*Client) AddHost

func (c *Client) AddHost(name string) (*backend.Host, error)

func (*Client) AddHostListener

func (c *Client) AddHostListener(hostname string, l *backend.Listener) (*backend.Listener, error)

func (*Client) AddLocation

func (c *Client) AddLocation(hostname, id, path, upstream string) (*backend.Location, error)

func (*Client) AddLocationWithOptions

func (c *Client) AddLocationWithOptions(hostname, id, path, upstream string, options backend.LocationOptions) (*backend.Location, error)

func (*Client) AddMiddleware

func (c *Client) AddMiddleware(spec *plugin.MiddlewareSpec, hostname, locationId string, m *backend.MiddlewareInstance) (*backend.MiddlewareInstance, error)

func (*Client) AddUpstream

func (c *Client) AddUpstream(id string) (*backend.Upstream, error)

func (*Client) AddUpstreamWithOptions

func (c *Client) AddUpstreamWithOptions(id string, o backend.UpstreamOptions) (*backend.Upstream, error)

func (*Client) Delete

func (c *Client) Delete(endpoint string) (*StatusResponse, error)

func (*Client) DeleteEndpoint

func (c *Client) DeleteEndpoint(upstreamId, id string) (*StatusResponse, error)

func (*Client) DeleteHost

func (c *Client) DeleteHost(name string) (*StatusResponse, error)

func (*Client) DeleteHostListener

func (c *Client) DeleteHostListener(name, listenerId string) (*StatusResponse, error)

func (*Client) DeleteLocation

func (c *Client) DeleteLocation(hostname, id string) (*StatusResponse, error)

func (*Client) DeleteMiddleware

func (c *Client) DeleteMiddleware(spec *plugin.MiddlewareSpec, hostname, locationId, mId string) (*StatusResponse, error)

func (*Client) DeleteUpstream

func (c *Client) DeleteUpstream(id string) (*StatusResponse, error)

func (*Client) Get

func (c *Client) Get(u string, params url.Values) ([]byte, error)

func (*Client) GetHost

func (c *Client) GetHost(name string) (*backend.Host, error)

func (*Client) GetHosts

func (c *Client) GetHosts() ([]*backend.Host, error)

func (*Client) GetLocation

func (c *Client) GetLocation(name, id string) (*backend.Location, error)

func (*Client) GetLogSeverity

func (c *Client) GetLogSeverity() (log.Severity, error)

func (*Client) GetStatus

func (c *Client) GetStatus() error

func (*Client) GetTopEndpoints

func (c *Client) GetTopEndpoints(upstreamId string, limit int) ([]*backend.Endpoint, error)

func (*Client) GetTopLocations

func (c *Client) GetTopLocations(hostname, upstreamId string, limit int) ([]*backend.Location, error)

func (*Client) GetUpstream

func (c *Client) GetUpstream(id string) (*backend.Upstream, error)

func (*Client) GetUpstreams

func (c *Client) GetUpstreams() ([]*backend.Upstream, error)

func (*Client) Post

func (c *Client) Post(endpoint string, in interface{}) ([]byte, error)

func (*Client) Put

func (c *Client) Put(endpoint string, in interface{}) ([]byte, error)

func (*Client) PutForm

func (c *Client) PutForm(endpoint string, values url.Values) (*StatusResponse, error)

func (*Client) RoundTrip

func (c *Client) RoundTrip(fn RoundTripFn) ([]byte, error)

func (*Client) UpdateHostKeyPair

func (c *Client) UpdateHostKeyPair(hostname string, keyPair *backend.KeyPair) (*backend.Host, error)

func (*Client) UpdateLocationOptions

func (c *Client) UpdateLocationOptions(hostname, location string, options backend.LocationOptions) (*backend.Location, error)

func (*Client) UpdateLocationUpstream

func (c *Client) UpdateLocationUpstream(hostname, location, upstream string) (*StatusResponse, error)

func (*Client) UpdateLogSeverity

func (c *Client) UpdateLogSeverity(s log.Severity) (*StatusResponse, error)

func (*Client) UpdateMiddleware

func (c *Client) UpdateMiddleware(spec *plugin.MiddlewareSpec, hostname, locationId string, m *backend.MiddlewareInstance) (*backend.MiddlewareInstance, error)

func (*Client) UpdateUpstreamOptions

func (c *Client) UpdateUpstreamOptions(upId string, options backend.UpstreamOptions) (*backend.Upstream, error)

type ConnectionsResponse

type ConnectionsResponse struct {
	Connections int
}

type EndpointsResponse

type EndpointsResponse struct {
	Endpoints []*backend.Endpoint
}

type ProxyController

type ProxyController struct {
	// contains filtered or unexported fields
}

type RoundTripFn

type RoundTripFn func() (*http.Response, error)

type SeverityResponse

type SeverityResponse struct {
	Severity string
}

type StatusResponse

type StatusResponse struct {
	Message string
}

func (*StatusResponse) Error

func (e *StatusResponse) Error() string

type UpstreamsResponse

type UpstreamsResponse struct {
	Upstreams []*backend.Upstream
}

Jump to

Keyboard shortcuts

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