transport

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0, MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel interface {
	Request(request HTTPRequest) (HTTPResponse, error)
}

type HTTPError

type HTTPError interface {
	failure.Failure
	Status() int
	Headers() http.Header
}

type HTTPRequest

type HTTPRequest interface {
	Headers() http.Header
	Body() io.Reader
}

type HTTPResponse

type HTTPResponse interface {
	Status() int
	Headers() http.Header
	Body() io.Reader
}

type InboundAcceptCodec

type InboundAcceptCodec interface {
	// Decoder will be used by a server to decode HTTP Request into an invocation
	// `Batch` that will be executed using a `service`.
	Decoder() RequestDecoder
	// Encoder will be used to encode batch of invocation results into an HTTP
	// response that will be sent back to the client that initiated the request.
	Encoder() ResponseEncoder
}

type InboundCodec

type InboundCodec interface {
	Accept(request HTTPRequest) (InboundAcceptCodec, HTTPError)
}

type OutboundCodec

type OutboundCodec interface {
	RequestEncoder
	ResponseDecoder
}

type RequestDecoder

type RequestDecoder interface {
	Decode(request HTTPRequest) (message.AgentMessage, error)
}

type RequestEncoder

type RequestEncoder interface {
	Encode(message message.AgentMessage) (HTTPRequest, error)
}

type ResponseDecoder

type ResponseDecoder interface {
	Decode(response HTTPResponse) (message.AgentMessage, error)
}

type ResponseEncoder

type ResponseEncoder interface {
	Encode(message message.AgentMessage) (HTTPResponse, error)
}

Directories

Path Synopsis
car

Jump to

Keyboard shortcuts

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