testconnection

package
v0.15.4-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpanCountTopicName added in v0.15.4

func GetSpanCountTopicName(opts ...TopicNameOption) string

func NewDsTestConnectionNotify

func NewDsTestConnectionNotify(
	dsTestListener *Listener,
	tracer trace.Tracer,
) *dsTestConnectionNotify

func NewDsTestConnectionRequest

func NewDsTestConnectionRequest(
	tracer trace.Tracer,
	newTraceDBFn tracedb.FactoryFunc,
	enabled bool,
) *dsTestConnectionRequest

func PostSpanCountTopicName added in v0.15.4

func PostSpanCountTopicName(opts ...TopicNameOption) string

func ResetSpanCountTopicName added in v0.15.4

func ResetSpanCountTopicName(opts ...TopicNameOption) string

Types

type Configurer

type Configurer[T any] struct {
	// contains filtered or unexported fields
}

func NewConfigurer

func NewConfigurer(meter metric.Meter) *Configurer[Job]

func (*Configurer[Job]) Configure

func (c *Configurer[Job]) Configure(queue *pipeline.Queue[Job])

type DataStoreTestPipeline

type DataStoreTestPipeline struct {
	*pipeline.Pipeline[Job]
	// contains filtered or unexported fields
}

func NewDataStoreTestPipeline

func NewDataStoreTestPipeline(
	pipeline *pipeline.Pipeline[Job],
	listener DsTestListener,
) *DataStoreTestPipeline

func (*DataStoreTestPipeline) NewJob

func (p *DataStoreTestPipeline) NewJob(ctx context.Context, datastore datastore.DataStore) Job

func (*DataStoreTestPipeline) Run

func (p *DataStoreTestPipeline) Run(ctx context.Context, job Job)

func (*DataStoreTestPipeline) Subscribe

func (p *DataStoreTestPipeline) Subscribe(jobID string, notifier NotifierFn) error

func (*DataStoreTestPipeline) Unsubscribe

func (p *DataStoreTestPipeline) Unsubscribe(jobID string)

type DsTestListener

type DsTestListener interface {
	Notify(Job)
	Subscribe(jobID string, notifier NotifierFn) error
	Unsubscribe(jobID string)
}

type GetSpanCountOption added in v0.15.4

type GetSpanCountOption func(*getSpanCountConfig)

func WithTimeout added in v0.15.4

func WithTimeout(timeout time.Duration) GetSpanCountOption

type Job

type Job struct {
	TenantID   string                 `json:"tenantId"`
	ID         string                 `json:"id"`
	DataStore  datastore.DataStore    `json:"datastore"`
	TestResult model.ConnectionResult `json:"testResult"`
}

type Listener

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

func NewListener

func NewListener() *Listener

func (*Listener) Notify

func (m *Listener) Notify(job Job)

func (*Listener) Subscribe

func (m *Listener) Subscribe(jobID string, notifier NotifierFn) error

func (*Listener) Unsubscribe

func (m *Listener) Unsubscribe(jobID string)

type NotifierFn

type NotifierFn func(Job)

type OTLPConnectionTestRequest added in v0.15.4

type OTLPConnectionTestRequest struct{}

type OTLPConnectionTestResponse added in v0.15.4

type OTLPConnectionTestResponse struct {
	TenantID string

	NumberSpans       int
	LastSpanTimestamp time.Time
}

type OTLPConnectionTester added in v0.15.4

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

func NewOTLPConnectionTester added in v0.15.4

func NewOTLPConnectionTester(subscriptionManager subscription.Manager) *OTLPConnectionTester

func (*OTLPConnectionTester) GetSpanCount added in v0.15.4

func (*OTLPConnectionTester) ResetSpanCount added in v0.15.4

func (t *OTLPConnectionTester) ResetSpanCount(ctx context.Context)

type TopicNameOption added in v0.15.4

type TopicNameOption func(*topicNameConfig)

func WithTenantID added in v0.15.4

func WithTenantID(tenantID string) TopicNameOption

Jump to

Keyboard shortcuts

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