mediator

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const (
	RouteOperationID  = "/mediator"
	RegisterPath      = RouteOperationID + "/register"
	UnregisterPath    = RouteOperationID + "/unregister"
	GetConnectionPath = RouteOperationID + "/connection"
	ReconnectPath     = RouteOperationID + "/reconnect"
	StatusPath        = RouteOperationID + "/status"
	BatchPickupPath   = RouteOperationID + "/batchpickup"
)

constants for the mediator operations

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionRes

type ConnectionRes struct {
	// in: body
	Params mediator.RegisterRoute
}

ConnectionRes model

response of get connection action

swagger:response getConnectionResponse

type Operation

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

Operation contains basic common operations provided by controller REST API.

func New

func New(ctx provider, autoAccept bool) (*Operation, error)

New returns new common operations rest client instance.

func (*Operation) BatchPickup

func (o *Operation) BatchPickup(rw http.ResponseWriter, req *http.Request)

BatchPickup swagger:route POST /mediator/batchpickup mediator batchPickupRequest

BatchPickup dispatches pending messages for given connection.

Responses:

default: genericError
200: batchPickupResponse

func (*Operation) Connection

func (o *Operation) Connection(rw http.ResponseWriter, req *http.Request)

Connection swagger:route GET /mediator/connection mediator routerConnection

Retrieves the router connection id.

Responses:

default: genericError
200: getConnectionResponse

func (*Operation) GetRESTHandlers

func (o *Operation) GetRESTHandlers() []rest.Handler

GetRESTHandlers get all controller API handler available for this service.

func (*Operation) Reconnect

func (o *Operation) Reconnect(rw http.ResponseWriter, req *http.Request)

Reconnect swagger:route POST /mediator/reconnect mediator reconnectRouteRequest

Reconnect the agent with the router to re-establish lost connection.

Responses:

default: genericError

func (*Operation) Register

func (o *Operation) Register(rw http.ResponseWriter, req *http.Request)

Register swagger:route POST /mediator/register mediator registerRouteRequest

Registers the agent with the router.

Responses:

default: genericError
200: registerRouteRes

func (*Operation) Status

func (o *Operation) Status(rw http.ResponseWriter, req *http.Request)

Status swagger:route POST /mediator/status mediator statusRequest

Status returns details about pending messages for given connection.

Responses:

default: genericError
200: statusResponse

func (*Operation) Unregister

func (o *Operation) Unregister(rw http.ResponseWriter, req *http.Request)

Unregister swagger:route DELETE /mediator/unregister mediator unregisterRouter

Unregisters the agent with the router.

Responses:

default: genericError

Jump to

Keyboard shortcuts

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