utils

package
v0.7.15 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WriteType = "write"
)

Variables

This section is empty.

Functions

func AppendColumn

func AppendColumn(col frames.Column, value interface{}) error

AppendColumn appends a value to a column

func AppendNil

func AppendNil(col frames.Column) error

AppendNil appends an empty value to data

func AppendValue

func AppendValue(data interface{}, value interface{}) (interface{}, error)

AppendValue appends a value to data

func ColAt

func ColAt(col frames.Column, i int) (interface{}, error)

ColAt return value at index i in column as interface{} This is a slightly different use case than col.ValueAt, also we don't want to use defer/recover due to performance overhead

func NewColumn

func NewColumn(value interface{}, size int) (interface{}, error)

NewColumn creates a new column from type of value

func NewColumnFromType

func NewColumnFromType(t string, size int) (interface{}, error)

NewColumn creates a new column from type of value

func RemoveColumn

func RemoveColumn(name string, columns []frames.Column) []frames.Column

RemoveColumn removes the first column that matches name from columns If the column is not found, columns is unchanged

Types

type HistoryEntry added in v0.7.6

type HistoryEntry struct {
	ActionType     string
	UserName       string
	BackendName    string
	TableName      string
	Container      string
	ActionDuration time.Duration
	StartTime      time.Time

	AdditionalData map[string]string
}

type HistoryServer added in v0.7.6

type HistoryServer struct {
	WriteMonitoringLogsTimeout     time.Duration
	PendingLogsBatchSize           int
	LogsFolderPath                 string
	LogsContainer                  string
	MaxBytesInNginxRequest         int
	HistoryFileDurationSecondSpans int64
	HistoryFileNum                 int
	// contains filtered or unexported fields
}

func NewHistoryServer added in v0.7.6

func NewHistoryServer(logger logger.Logger, cfg *frames.Config) *HistoryServer

func (*HistoryServer) AddCreateLog added in v0.7.6

func (m *HistoryServer) AddCreateLog(createRequest *frames.CreateRequest, duration time.Duration, startTime time.Time)

func (*HistoryServer) AddDeleteLog added in v0.7.6

func (m *HistoryServer) AddDeleteLog(deleteRequest *frames.DeleteRequest, duration time.Duration, startTime time.Time)

func (*HistoryServer) AddExecuteLog added in v0.7.6

func (m *HistoryServer) AddExecuteLog(execRequest *frames.ExecRequest, duration time.Duration, startTime time.Time)

func (*HistoryServer) AddReadLog added in v0.7.8

func (m *HistoryServer) AddReadLog(readRequest *frames.ReadRequest, duration time.Duration, startTime time.Time)

func (*HistoryServer) AddWriteLog added in v0.7.8

func (m *HistoryServer) AddWriteLog(writeRequest *frames.WriteRequest, duration time.Duration, startTime time.Time)

func (*HistoryServer) GetLogs added in v0.7.6

func (m *HistoryServer) GetLogs(request *frames.HistoryRequest, out chan frames.Frame) error

func (*HistoryServer) Start added in v0.7.6

func (m *HistoryServer) Start()

func (*HistoryServer) StartEvictionTask added in v0.7.6

func (m *HistoryServer) StartEvictionTask()

Jump to

Keyboard shortcuts

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