Documentation
¶
Overview ¶
Package client provides a client for the router API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("router: route not found")
ErrNotFound is returned when no route was found.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// CreateRoute creates a new route.
CreateRoute(*router.Route) error
// UpdateRoute updates an existing route by overwriting all fields on the route
// except ID and Domain.
UpdateRoute(*router.Route) error
// DeleteRoute deletes the route with the specified routeType and id.
DeleteRoute(routeType, id string) error
// GetRoute returns a route with the specified routeType and id.
GetRoute(routeType, id string) (*router.Route, error)
// ListRoutes returns a list of routes. If parentRef is not empty, routes
// are filtered by the reference (ex: "controller/apps/myapp").
ListRoutes(parentRef string) ([]*router.Route, error)
StreamEvents(output chan *router.StreamEvent) (stream.Stream, error)
// CreateCert creates a new route certificate.
CreateCert(*router.Certificate) error
// GetCert returns a route cert with specified id.
GetCert(id string) (*router.Certificate, error)
// DeleteCert deletes the route certificate with the specified id.
DeleteCert(id string) error
// ListCerts returns a list of certificates.
ListCerts() ([]*router.Certificate, error)
// ListCertRoutes returns a list of routes assigned to the specified certificate.
ListCertRoutes(id string) ([]*router.Route, error)
}
Client is a client for the router API.
func NewWithAddr ¶
NewWithAddr uses addr as the specified API url and returns a client.
func NewWithHTTP ¶
NewWithHTTP does the same thing as New but uses the given *http.Client
Click to show internal directories.
Click to hide internal directories.