Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2017 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebsocketUpgrader = websocket.Upgrader{
	EnableCompression: true,

	WriteBufferSize: 128,
}

WebsocketUpgrader represents the default websocket.Upgrader that Draft employs

Functions

This section is empty.

Types

type DockerAuth added in v0.4.0

type DockerAuth map[string]RegistryAuth

DockerAuth is a container for the registry authentication credentials wrapped by the registry server name

type RegistryAuth added in v0.4.0

type RegistryAuth struct {
	Username      string `json:"username"`
	Password      string `json:"password"`
	Email         string `json:"email"`
	RegistryToken string `json:"registrytoken"`
}

RegistryAuth is the registry authentication credentials

type Server added in v0.2.0

type Server struct {
	HTTPServer   *http.Server
	Listener     net.Listener
	DockerClient *docker.Client
	HelmClient   *helm.Client
	KubeClient   *kubernetes.Clientset
	// RegistryAuth is the authorization token used to push images up to the registry.
	//
	// This field follows the format of the X-Registry-Auth header.
	RegistryAuth string
	// RegistryOrg is the organization (e.g. your DockerHub account) used to push images
	// up to the registry.
	RegistryOrg string
	// RegistryURL is the URL of the registry (e.g. quay.io, docker.io, gcr.io)
	RegistryURL string
	// Basedomain is the basedomain used to construct the ingress rules
	Basedomain string
}

Server is an API Server which listens and responds to HTTP requests.

func NewServer

func NewServer(proto, addr string) (*Server, error)

NewServer sets up the required Server and does protocol specific checking.

func (*Server) Close added in v0.2.0

func (s *Server) Close() error

Close shuts down the HTTP server, dropping all current connections.

func (*Server) Middleware added in v0.2.0

func (s *Server) Middleware(h httprouter.Handle) httprouter.Handle

Middleware adds additional context before handling requests

func (*Server) Serve added in v0.2.0

func (s *Server) Serve() error

Serve starts the HTTP server, accepting all new connections.

func (*Server) ServeRequest added in v0.2.0

func (s *Server) ServeRequest(w http.ResponseWriter, req *http.Request)

ServeRequest processes a single HTTP request.

Jump to

Keyboard shortcuts

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