server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DAQD_OK     = "0000"
	DAQD_ERR    = "0001"
	DAQD_SYNTAX = "0019"
	DAQD_DELAY  = "001c"
)

Variables

This section is empty.

Functions

func ChannelToStr

func ChannelToStr(ch *common.BasicChannel) string

func LogRequest

func LogRequest(handler func(http.ResponseWriter, *http.Request)) http.HandlerFunc

func ServeNds3

func ServeNds3(listener net.Listener, db func() *mds.MetaDataStore, localReaderAddr string)

Types

type BufferedWriter

type BufferedWriter interface {
	io.Writer
	Flush() error
}

BufferedWriter is an io.Writer that can be flushed. This allows the client to batch up writes and be more efficient.

type ChannelPredicateFull

type ChannelPredicateFull struct {
	ChannelPredicateSimple
	// contains filtered or unexported fields
}

func CreateChannelPredicateFull

func CreateChannelPredicateFull(pattern *nds2parser.BashPattern, classType common.ClassType) *ChannelPredicateFull

func (*ChannelPredicateFull) Matches

func (p *ChannelPredicateFull) Matches(channel *mds.BasicChannel) bool

type ChannelPredicateSimple

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

func CreateChannelPredicateSimple

func CreateChannelPredicateSimple(classType common.ClassType) *ChannelPredicateSimple

func (*ChannelPredicateSimple) Matches

func (p *ChannelPredicateSimple) Matches(channel *mds.BasicChannel) bool

type Client

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

func CreateClient

func CreateClient(conn BufferedWriter, db *mds.MetaDataStore, epochs Epoch) *Client

func (*Client) Process

func (c *Client) Process(command *nds2parser.ParsedCommand) error

type Epoch

type Epoch []byte

func LoadEpochs

func LoadEpochs(fname string) Epoch

type StatusCapture

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

func NewStatusCapture

func NewStatusCapture(w http.ResponseWriter) StatusCapture

func (*StatusCapture) Header

func (l *StatusCapture) Header() http.Header

func (*StatusCapture) StatusCode

func (l *StatusCapture) StatusCode() int

func (*StatusCapture) Write

func (l *StatusCapture) Write(data []byte) (int, error)

func (*StatusCapture) WriteHeader

func (l *StatusCapture) WriteHeader(statusCode int)

Jump to

Keyboard shortcuts

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