datasource

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 8

Documentation

Index

Constants

View Source
const (
	StatusUp   = "UP"
	StatusDown = "DOWN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Status  string                 `json:"status,omitempty"`
	Details map[string]interface{} `json:"details,omitempty"`
}

type Logger

type Logger interface {
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Log(args ...interface{})
	Logf(format string, args ...interface{})
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
}

Logger interface is used by datasource packages to log information about query execution. Developer Notes: Note that it's a reduced version of logging.Logger interface. We are not using that package to ensure that datasource package is not dependent on logging package. That way logging package should be easily able to import datasource package and provide a different "pretty" version for different log types defined here while avoiding the cyclical import issue. Idiomatically, interfaces should be defined by packages who are using it; unlike other languages. Also - accept interfaces, return concrete types.

type MockLogger

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

func NewMockLogger

func NewMockLogger(level int) *MockLogger

func (*MockLogger) Debug

func (m *MockLogger) Debug(args ...interface{})

func (*MockLogger) Debugf

func (m *MockLogger) Debugf(format string, args ...interface{})

func (*MockLogger) Error

func (m *MockLogger) Error(args ...interface{})

func (*MockLogger) Errorf

func (m *MockLogger) Errorf(format string, args ...interface{})

func (*MockLogger) Log

func (m *MockLogger) Log(args ...interface{})

func (*MockLogger) Logf

func (m *MockLogger) Logf(format string, args ...interface{})

Directories

Path Synopsis
cassandra module
clickhouse module
dgraph module
file
ftp Module
s3 Module
sftp Module
kv-store
badger Module
mongo module
pubsub
eventhub Module
nats Module
solr module

Jump to

Keyboard shortcuts

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