Documentation ¶
Index ¶
Constants ¶
View Source
const ( UpsertRoute = "UpsertRoute" DeleteRoute = "Delete" ListRoute = "List" EventStreamRoute = "EventStream" ListRouterGroups = "ListRouterGroups" UpdateRouterGroup = "UpdateRouterGroup" CreateRouterGroup = "CreateRouterGroup" DeleteRouterGroup = "DeleteRouterGroup" UpsertTcpRouteMapping = "UpsertTcpRouteMapping" DeleteTcpRouteMapping = "DeleteTcpRouteMapping" ListTcpRouteMapping = "ListTcpRouteMapping" EventStreamTcpRoute = "TcpRouteEventStream" )
Variables ¶
View Source
var RoutesMap = map[string]rata.Route{UpsertRoute: {Path: "/routing/v1/routes", Method: "POST", Name: UpsertRoute}, DeleteRoute: {Path: "/routing/v1/routes", Method: "DELETE", Name: DeleteRoute}, ListRoute: {Path: "/routing/v1/routes", Method: "GET", Name: ListRoute}, EventStreamRoute: {Path: "/routing/v1/events", Method: "GET", Name: EventStreamRoute}, CreateRouterGroup: {Path: "/routing/v1/router_groups", Method: "POST", Name: CreateRouterGroup}, DeleteRouterGroup: {Path: "/routing/v1/router_groups/:guid", Method: "DELETE", Name: DeleteRouterGroup}, ListRouterGroups: {Path: "/routing/v1/router_groups", Method: "GET", Name: ListRouterGroups}, UpdateRouterGroup: {Path: "/routing/v1/router_groups/:guid", Method: "PUT", Name: UpdateRouterGroup}, UpsertTcpRouteMapping: {Path: "/routing/v1/tcp_routes/create", Method: "POST", Name: UpsertTcpRouteMapping}, DeleteTcpRouteMapping: {Path: "/routing/v1/tcp_routes/delete", Method: "POST", Name: DeleteTcpRouteMapping}, ListTcpRouteMapping: {Path: "/routing/v1/tcp_routes", Method: "GET", Name: ListTcpRouteMapping}, EventStreamTcpRoute: {Path: "/routing/v1/tcp_routes/events", Method: "GET", Name: EventStreamTcpRoute}, }
Functions ¶
Types ¶
type Client ¶
type Client interface { SetToken(string) UpsertRoutes([]models.Route) error Routes() ([]models.Route, error) DeleteRoutes([]models.Route) error RouterGroups() ([]models.RouterGroup, error) RouterGroupWithName(string) (models.RouterGroup, error) UpdateRouterGroup(models.RouterGroup) error CreateRouterGroup(models.RouterGroup) error DeleteRouterGroup(models.RouterGroup) error ReservePort(string, string) (int, error) UpsertTcpRouteMappings([]models.TcpRouteMapping) error DeleteTcpRouteMappings([]models.TcpRouteMapping) error TcpRouteMappings() ([]models.TcpRouteMapping, error) FilteredTcpRouteMappings([]string) ([]models.TcpRouteMapping, error) SubscribeToEvents() (EventSource, error) SubscribeToEventsWithMaxRetries(retries uint16) (EventSource, error) SubscribeToTcpEvents() (TcpEventSource, error) SubscribeToTcpEventsWithMaxRetries(retries uint16) (TcpEventSource, error) }
type EventSource ¶
func NewEventSource ¶
func NewEventSource(raw RawEventSource) EventSource
type TcpEvent ¶
type TcpEvent struct { TcpRouteMapping models.TcpRouteMapping Action string }
type TcpEventSource ¶
func NewTcpEventSource ¶
func NewTcpEventSource(raw RawEventSource) TcpEventSource
type Type ¶
type Type string
const ( ResponseError Type = "ResponseError" ResourceNotFoundError Type = "ResourceNotFoundError" ProcessRequestError Type = "ProcessRequestError" RouteInvalidError Type = "RouteInvalidError" RouteServiceUrlInvalidError Type = "RouteServiceUrlInvalidError" DBCommunicationError Type = "DBCommunicationError" GuidGenerationError Type = "GuidGenerationError" TcpRouteMappingInvalidError Type = "TcpRouteMappingInvalidError" DBConflictError Type = "DBConflictError" PortRangeExhaustedError Type = "PortRangeExhaustedError" )
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
fakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
fakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
fakes
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
fakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
fakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.