server

package
v0.0.0-...-b29f263 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricConnectionsEstablishedExt = metrics.AddCounter("conn_established_ext")
	MetricConnectionsEstablishedL1  = metrics.AddCounter("conn_established_l1")
	MetricConnectionsEstablishedL2  = metrics.AddCounter("conn_established_l2")
	MetricCmdTotal                  = metrics.AddCounter("cmd_total")
	MetricErrAppError               = metrics.AddCounter("err_app_err")
	MetricErrUnrecoverable          = metrics.AddCounter("err_unrecoverable")

	HistSet     = metrics.AddHistogram("set", false)
	HistAdd     = metrics.AddHistogram("add", false)
	HistReplace = metrics.AddHistogram("replace", false)
	HistDelete  = metrics.AddHistogram("delete", false)
	HistTouch   = metrics.AddHistogram("touch", false)
	HistGet     = metrics.AddHistogram("get", false)  // not sampled until configurable
	HistGetE    = metrics.AddHistogram("gete", false) // not sampled until configurable
	HistGat     = metrics.AddHistogram("gat", false)  // not sampled until configurable

)

Functions

func ListenAndServe

func ListenAndServe(l ListenArgs, s ServerConst, o orcas.OrcaConst, h1, h2 handlers.HandlerConst)

Types

type DefaultServer

type DefaultServer struct {
	// contains filtered or unexported fields
}

func (*DefaultServer) Loop

func (s *DefaultServer) Loop()

type ListenArgs

type ListenArgs struct {
	// The type of the connection. "tcp" or "unix" only.
	Type ListenType
	// TCP port to listen on, if applicable
	Port int
	// Unix domain socket path to listen on, if applicable
	Path string
}

type ListenType

type ListenType int
const (
	ListenTCP ListenType = iota
	ListenUnix
)

type Server

type Server interface {
	Loop()
}

func Default

func Default(conns []io.Closer, rp common.RequestParser, o orcas.Orca) Server

type ServerConst

type ServerConst func(conns []io.Closer, rp common.RequestParser, o orcas.Orca) Server

Jump to

Keyboard shortcuts

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