instance

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address  string `json:"address"`
	Username string `json:"username"`
	Password string `json:"password"`
	Token    string `json:"token"`
}

Config is the structure of the configuration for a single Jaeger database instance.

type Instance

type Instance interface {
	GetName() string

	GetServices(ctx context.Context) (map[string]any, error)
	GetOperations(ctx context.Context, service string) (map[string]any, error)
	GetTraces(ctx context.Context, limit, maxDuration, minDuration, operation, service, tags string, timeStart, timeEnd int64) (map[string]any, error)
	GetTrace(ctx context.Context, traceID string) (map[string]any, error)
	// contains filtered or unexported methods
}

func New

func New(name string, options map[string]any) (Instance, error)

New returns a new Jaeger instance for the given configuration.

type MockInstance

type MockInstance struct {
	mock.Mock
}

MockInstance is an autogenerated mock type for the Instance type

func NewMockInstance

func NewMockInstance(t NewMockInstanceT) *MockInstance

NewMockInstance creates a new instance of MockInstance. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockInstance) GetName

func (_m *MockInstance) GetName() string

GetName provides a mock function with given fields:

func (*MockInstance) GetOperations

func (_m *MockInstance) GetOperations(ctx context.Context, service string) (map[string]interface{}, error)

GetOperations provides a mock function with given fields: ctx, service

func (*MockInstance) GetServices

func (_m *MockInstance) GetServices(ctx context.Context) (map[string]interface{}, error)

GetServices provides a mock function with given fields: ctx

func (*MockInstance) GetTrace

func (_m *MockInstance) GetTrace(ctx context.Context, traceID string) (map[string]interface{}, error)

GetTrace provides a mock function with given fields: ctx, traceID

func (*MockInstance) GetTraces

func (_m *MockInstance) GetTraces(ctx context.Context, limit string, maxDuration string, minDuration string, operation string, service string, tags string, timeStart int64, timeEnd int64) (map[string]interface{}, error)

GetTraces provides a mock function with given fields: ctx, limit, maxDuration, minDuration, operation, service, tags, timeStart, timeEnd

type NewMockInstanceT

type NewMockInstanceT interface {
	mock.TestingT
	Cleanup(func())
}

type ResponseError

type ResponseError struct {
	Errors []struct {
		Code int    `json:"code"`
		Msg  string `json:"msg"`
	} `json:"errors"`
}

ResponseError is the structure for a failed Jaeger API request.

Jump to

Keyboard shortcuts

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