tcpserver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: BlueOak-1.0.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(action, format string, a ...interface{}) error

func NewError

func NewError(action string, err error) error

func NewErrorWithValue

func NewErrorWithValue(action string, value interface{}, err error) error

Types

type Accepter

type Accepter interface {
	Accept() (net.Conn, error)
	Close() error
	SetDeadline(time.Time) error
}

type Conn

type Conn struct {
	log.Logger
	client.Client
	Grouping bool
	DB       string
}

func (*Conn) BatchMetrics added in v0.2.0

func (c *Conn) BatchMetrics(event *Event) (client.BatchPoints, error)

type Error

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

func (*Error) Action

func (e *Error) Action() string

func (*Error) Error

func (e *Error) Error() string

func (*Error) Value

func (e *Error) Value() interface{}

type Event

type Event struct {
	*types.Event
}

func ReadEvent

func ReadEvent(reader io.Reader) (*Event, error)

func (*Event) BaseTags

func (e *Event) BaseTags() map[string]string

func (*Event) Validate

func (e *Event) Validate() error

type InAction

type InAction interface {
	Action() string
	Value() interface{}
}

type Listener

type Listener interface {
	Listen(string) (Accepter, error)
}

type Serv

type Serv struct {
	log.Logger
	Listener
	client.Client
	DB       string
	Grouping bool
}

func New

func New(logger log.Logger) *Serv

func (*Serv) InfluxConn

func (s *Serv) InfluxConn(c client.Client, dbname string)

func (*Serv) Log

func (s *Serv) Log(args ...interface{})

func (*Serv) Run

func (s *Serv) Run(listen string) error

type TCPListener

type TCPListener struct{}

func (*TCPListener) Listen

func (l *TCPListener) Listen(listen string) (Accepter, error)

Jump to

Keyboard shortcuts

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