http

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentTransport

type AgentTransport struct {
	transport.Transport

	URL *url.URL
	*http.Client
}

AgentTransport provides an HTTP transport for the agent to communicate with a server.

func (*AgentTransport) WriteAgentMessage

WriteAgentMessage sends an agent message to the server using HTTP(s).

type ServerTransport

type ServerTransport struct {
	transport.Transport
	Log    *zap.Logger
	Server transport.AgentMessageWriter
}

ServerTransport provides a transport for the server to handle HTTP communications from an agent.

func (*ServerTransport) ListenAndServe

func (t *ServerTransport) ListenAndServe(addr string) error

ListenAndServe will begin serving the http transport on the provided address.

func (*ServerTransport) ServeHTTP

func (t *ServerTransport) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP enables the transport to handle HTTP requests provided to the server.

Jump to

Keyboard shortcuts

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