restapi

package
v2.4.10 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const EndPointConsumeHere = "/consume-here"
View Source
const HeaderCallerInterceptID = "x-telepresence-caller-intercept-id"
View Source
const HeaderInterceptID = "x-telepresence-intercept-id"

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentState

type AgentState interface {
	// Intercepts returns true if the agent currently intercepts the given Header
	Intercepts(context.Context, string, http.Header) (bool, error)
}

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error,omitempty"`
}

type Server

type Server interface {
	ListenAndServe(context.Context, int) error
	Serve(context.Context, net.Listener) error
}

func NewServer

func NewServer(agent AgentState, client bool) Server

Jump to

Keyboard shortcuts

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