Back to godoc.org

Package multiendpoint

v0.4.4
Latest Go to latest

The latest major version is .

Published: Mar 4, 2020 | License: MIT | Module: github.com/Xiot/zanzibar

Index

type Endpoint

type Endpoint interface {
	Register(*zanzibar.Gateway) error
}

Endpoint registers a request handler on a gateway

func NewEndpoint

func NewEndpoint(deps *module.Dependencies) Endpoint

NewEndpoint returns a collection of endpoints that can be registered on a gateway

type EndpointHandlers

type EndpointHandlers struct {
	ServiceAFrontHelloHandler *ServiceAFrontHelloHandler
	ServiceBFrontHelloHandler *ServiceBFrontHelloHandler
}

EndpointHandlers is a collection of individual endpoint handlers

func (*EndpointHandlers) Register

func (handlers *EndpointHandlers) Register(gateway *zanzibar.Gateway) error

Register registers the endpoint handlers with the gateway

type ServiceAFrontHelloHandler

type ServiceAFrontHelloHandler struct {
	Dependencies *module.Dependencies
	// contains filtered or unexported fields
}

ServiceAFrontHelloHandler is the handler for "/multi/serviceA_f/hello"

func NewServiceAFrontHelloHandler

func NewServiceAFrontHelloHandler(deps *module.Dependencies) *ServiceAFrontHelloHandler

NewServiceAFrontHelloHandler creates a handler

func (*ServiceAFrontHelloHandler) HandleRequest

func (h *ServiceAFrontHelloHandler) HandleRequest(
	ctx context.Context,
	req *zanzibar.ServerHTTPRequest,
	res *zanzibar.ServerHTTPResponse,
)

HandleRequest handles "/multi/serviceA_f/hello".

func (*ServiceAFrontHelloHandler) Register

func (h *ServiceAFrontHelloHandler) Register(g *zanzibar.Gateway) error

Register adds the http handler to the gateway's http router

type ServiceBFrontHelloHandler

type ServiceBFrontHelloHandler struct {
	Dependencies *module.Dependencies
	// contains filtered or unexported fields
}

ServiceBFrontHelloHandler is the handler for "/multi/serviceB_f/hello"

func NewServiceBFrontHelloHandler

func NewServiceBFrontHelloHandler(deps *module.Dependencies) *ServiceBFrontHelloHandler

NewServiceBFrontHelloHandler creates a handler

func (*ServiceBFrontHelloHandler) HandleRequest

func (h *ServiceBFrontHelloHandler) HandleRequest(
	ctx context.Context,
	req *zanzibar.ServerHTTPRequest,
	res *zanzibar.ServerHTTPResponse,
)

HandleRequest handles "/multi/serviceB_f/hello".

func (*ServiceBFrontHelloHandler) Register

func (h *ServiceBFrontHelloHandler) Register(g *zanzibar.Gateway) error

Register adds the http handler to the gateway's http router

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier