seslog2

package
v0.0.0-...-20bd0e9 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDuration

func ParseDuration(s string) (time.Duration, error)

ParseDuration parses a duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h", "d", "w".

Types

type AccessLogServer

type AccessLogServer struct {
	Options
	*ClickHouse

	*syslog.Server
	*syslog.ChannelHandler
	syslog.LogPartsChannel
}

func NewAccessLogServer

func NewAccessLogServer(options Options) (*AccessLogServer, error)

func (*AccessLogServer) Run

func (s *AccessLogServer) Run() error

type ClickHouse

type ClickHouse struct {
	Options
	driver.Conn
	// contains filtered or unexported fields
}

func NewClickHouse

func NewClickHouse(options Options) (*ClickHouse, error)

type Event

type Event map[string]string

type EventQueue

type EventQueue struct {
	*ClickHouse
	// contains filtered or unexported fields
}

func NewEventQueue

func NewEventQueue(tag string, clickHouse *ClickHouse) *EventQueue

func (*EventQueue) FieldNames

func (q *EventQueue) FieldNames() []string

func (*EventQueue) Try

func (q *EventQueue) Try(retry *int, f func() error, onFail func()) bool

type EventQueueByTag

type EventQueueByTag map[string]*EventQueue

type Options

type Options struct {
	Clickhouse struct {
		User     string `json:"user"`
		Password string `json:"password"`
		Host     string `json:"host"`
		Port     int    `json:"port"`
		Database string `json:"database"`
	} `json:"clickhouse"`
	Listen        string `json:"listen"`
	FlushInterval string `json:"flush_interval"`
	Retry         int    `json:"retry"`
	RetryTimeout  string `json:"retry_timeout"`

	WriteOnFail string `json:"write_on_fail"`
	// contains filtered or unexported fields
}

func ParseOptions

func ParseOptions(b []byte) (Options, error)

type Row

type Row []interface{}

type TypedEvent

type TypedEvent map[string]interface{}

type VarType

type VarType int
const (
	VarString VarType = iota
	VarDateTime
	VarInt
	VarFloat
	VarBool
)

Jump to

Keyboard shortcuts

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