utils

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2018 Iguazio Systems Ltd.

Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.

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, error)

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