driver

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDriverNotFound = errors.New("driver not found")
)

Functions

func Check

func Check(name string, cfg string) error

func Register

func Register(driver IDriver)

Types

type IDriver

type IDriver interface {
	Name() string
	Check(cfg string) error
	Create(cfg string) (IExecutor, error)
}

func Get

func Get(name string) (IDriver, bool)

type IExecutor

type IExecutor interface {
	Init(ctx context.Context) error
	CommonStatistics(ctx context.Context, start, end time.Time, groupBy string, limit int, wheres []monitor.MonWhereItem) (map[string]monitor.MonCommonData, error)
	RequestSummary(ctx context.Context, start time.Time, end time.Time, wheres []monitor.MonWhereItem) (*monitor.Summary, error)
	ProxySummary(ctx context.Context, start time.Time, end time.Time, wheres []monitor.MonWhereItem) (*monitor.Summary, error)
	InvokeTrend(ctx context.Context, start time.Time, end time.Time, wheres []monitor.MonWhereItem) (*monitor.MonInvokeCountTrend, string, error)
	ProxyTrend(ctx context.Context, start time.Time, end time.Time, wheres []monitor.MonWhereItem) (*monitor.MonInvokeCountTrend, string, error)
	MessageTrend(ctx context.Context, start time.Time, end time.Time, wheres []monitor.MonWhereItem) (*monitor.MonMessageTrend, string, error)
}

func CreateExecutor

func CreateExecutor(name string, cfg string) (IExecutor, error)

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) Get

func (m *Manager) Get(name string) (IDriver, bool)

func (*Manager) Names

func (m *Manager) Names() []string

func (*Manager) Register

func (m *Manager) Register(driver IDriver)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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