api

package
v0.0.0-...-22c38b1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2018 License: MIT Imports: 16 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomHTTPErrorHandler

func CustomHTTPErrorHandler(err error, c echo.Context)

Types

type ApiService

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

ApiService ...

func NewAPI

func NewAPI(balancer fusis.Balancer) ApiService

NewAPI ...

func (ApiService) Serve

func (as ApiService) Serve()

Serve starts the api. Binds IP using HOST env or 0.0.0.0 Binds to port using PORT env or 8000

type Client

type Client struct {
	Addr       string
	HttpClient *http.Client
}

func NewClient

func NewClient(addr string) *Client

func (*Client) AddDestination

func (c *Client) AddDestination(dst types.Destination) error

func (*Client) CreateService

func (c *Client) CreateService(svc types.Service) error

func (*Client) DeleteDestination

func (c *Client) DeleteDestination(serviceId, destinationId string) error

func (*Client) DeleteService

func (c *Client) DeleteService(id string) error

func (*Client) GetService

func (c *Client) GetService(id string) (*types.Service, error)

func (*Client) GetServices

func (c *Client) GetServices() ([]types.Service, error)

type ErrResponse

type ErrResponse map[string]interface{}

type ServiceResponse

type ServiceResponse struct {
	types.Service
	Destinations []types.Destination
}

Jump to

Keyboard shortcuts

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