server

package module
v0.0.0-...-9f1f843 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const ConnectionTimeout = rpc.DefaultTimeout

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractEndpoint

type AbstractEndpoint interface {
	// contains filtered or unexported methods
}

type AuthEndpoint

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

func NewAuthEndpoint

func NewAuthEndpoint() *AuthEndpoint

func (*AuthEndpoint) Execute

func (endpoint *AuthEndpoint) Execute(args *types.AuthRequest, resp *types.AuthResponse) error

type BackendOpts

type BackendOpts struct {
	Type       string                 `yaml:"type"`       // e.g. memory, redis
	Identifier string                 `yaml:"identifier"` // unique name
	Metadata   bool                   `yaml:"metadata"`   // if true, this will store the metadata
	Options    map[string]interface{} `yaml:"options"`    // backend specific options
}

type BackendStrategyOpts

type BackendStrategyOpts struct {
	Type    string                 `yaml:"type"`    // e.g. simple
	Options map[string]interface{} `yaml:"options"` // strategy specific options
}

type Connections

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

func NewConnections

func NewConnections() *Connections

func (*Connections) ExpiredConnections

func (c *Connections) ExpiredConnections() uint64

type EndpointName

type EndpointName string

func (EndpointName) String

func (name EndpointName) String() string

type EndpointOpts

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

type FutureUnixTime

type FutureUnixTime int64

type Instance

type Instance struct {
	*Connections

	*Sessions

	// stats
	Stats
	// contains filtered or unexported fields
}

func New

func New(opts *Opts) *Instance

func (*Instance) Init

func (instance *Instance) Init() error

initialise all server stuff without actually listening

func (*Instance) MetaStore

func (instance *Instance) MetaStore() backend.IMetadata

func (*Instance) Opts

func (instance *Instance) Opts() *Opts

func (*Instance) RegisterConn

func (instance *Instance) RegisterConn(conn net.Conn)

func (*Instance) RemoveConn

func (instance *Instance) RemoveConn(conn net.Conn)

func (*Instance) RpcListener

func (instance *Instance) RpcListener() net.Listener

func (*Instance) SelectBackend

func (instance *Instance) SelectBackend(context backend.ContextBackend) (backend.IAbstractBackend, error)

func (*Instance) ServeConn

func (instance *Instance) ServeConn(conn net.Conn)

func (*Instance) SetRpcListener

func (instance *Instance) SetRpcListener(rpcListener net.Listener)

func (*Instance) Shutdown

func (instance *Instance) Shutdown() error

stop listening, this should only be called once per instance

func (*Instance) Start

func (instance *Instance) Start() (err error)

start server listening, this should only be called once per instance

func (*Instance) StartListening

func (instance *Instance) StartListening() error

func (*Instance) Statistics

func (instance *Instance) Statistics() Stats

type NoOpEndpoint

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

func NewNoOpEndpoint

func NewNoOpEndpoint() *NoOpEndpoint

func (*NoOpEndpoint) Execute

func (endpoint *NoOpEndpoint) Execute(args *types.ReadRequest, resp *types.ReadResponse) error

type Opts

type Opts struct {
	rpc.OptsConnection `yaml:"connection"`
	TelnetPort         int                 `yaml:"telnet_port"`
	TelnetHost         string              `yaml:"telnet_host"`
	Backends           []BackendOpts       `yaml:"backends"`
	BackendStrategy    BackendStrategyOpts `yaml:"backendStrategy"`
}

func NewOpts

func NewOpts() *Opts

type ReaderEndpoint

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

func NewReaderEndpoint

func NewReaderEndpoint() *ReaderEndpoint

func (*ReaderEndpoint) Execute

func (endpoint *ReaderEndpoint) Execute(args *types.ReadRequest, resp *types.ReadResponse) error

type SeriesMetadataEndpoint

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

func NewSeriesMetadataEndpoint

func NewSeriesMetadataEndpoint() *SeriesMetadataEndpoint

func (*SeriesMetadataEndpoint) Execute

type SessionId

type SessionId int

type SessionToken

type SessionToken []byte

type Sessions

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

func NewSessions

func NewSessions() *Sessions

func (*Sessions) ExpiredSession

func (s *Sessions) ExpiredSession() uint64

type Stats

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

func (Stats) NumAuthentications

func (s Stats) NumAuthentications() uint64

func (Stats) NumCalls

func (s Stats) NumCalls() uint64

func (Stats) NumReads

func (s Stats) NumReads() uint64

func (Stats) NumSeriesCreated

func (s Stats) NumSeriesCreated() uint64

func (Stats) NumSeriesInitialised

func (s Stats) NumSeriesInitialised() uint64

func (Stats) NumValuesWritten

func (s Stats) NumValuesWritten() uint64

type WriterEndpoint

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

func NewWriterEndpoint

func NewWriterEndpoint() *WriterEndpoint

func (*WriterEndpoint) Execute

func (endpoint *WriterEndpoint) Execute(args *types.WriteRequest, resp *types.WriteResponse) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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