testserver

package
v0.0.0-...-460f186 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func ConvertSDKPostCommitVolumesToCorePostCommitVolumes

func ConvertSDKPostCommitVolumesToCorePostCommitVolumes(volumes map[string]map[string]components.V2Volume) ledger.PostCommitVolumes

func ConvertSDKPostingToCorePosting

func ConvertSDKPostingToCorePosting(p components.V2Posting) ledger.Posting

func ConvertSDKTxToCoreTX

func ConvertSDKTxToCoreTX(tx *components.V2Transaction) ledger.Transaction

func DefaultPageSizeInstrumentation

func DefaultPageSizeInstrumentation(size uint64) testservice.InstrumentationFunc

func ExperimentalEnableWorker

func ExperimentalEnableWorker() testservice.InstrumentationFunc

func ExperimentalExportersInstrumentation

func ExperimentalExportersInstrumentation() testservice.InstrumentationFunc

func ExperimentalFeaturesInstrumentation

func ExperimentalFeaturesInstrumentation() testservice.InstrumentationFunc

func ExperimentalNumscriptRewriteInstrumentation

func ExperimentalNumscriptRewriteInstrumentation() testservice.InstrumentationFunc

func ExperimentalPipelinesPullIntervalInstrumentation

func ExperimentalPipelinesPullIntervalInstrumentation(duration time.Duration) testservice.InstrumentationFunc

func ExperimentalPipelinesPushRetryPeriodInstrumentation

func ExperimentalPipelinesPushRetryPeriodInstrumentation(duration time.Duration) testservice.InstrumentationFunc

func GRPCAddressInstrumentation

func GRPCAddressInstrumentation(addr string) testservice.InstrumentationFunc

func GetTestServerOptions

func GetTestServerOptions(postgresConnectionOptions *deferred.Deferred[bunconnect.ConnectionOptions]) testservice.Option

func LogsHashBlockCRONSpecInstrumentation

func LogsHashBlockCRONSpecInstrumentation(spec string) testservice.InstrumentationFunc

func LogsHashBlockMaxSizeInstrumentation

func LogsHashBlockMaxSizeInstrumentation(size int) testservice.InstrumentationFunc

func MaxPageSizeInstrumentation

func MaxPageSizeInstrumentation(size uint64) testservice.InstrumentationFunc

func NewTestServer

func NewTestServer(postgresConnectionOptions *deferred.Deferred[bunconnect.ConnectionOptions], options ...testservice.Option) *testservice.Service

func WorkerAddressInstrumentation

func WorkerAddressInstrumentation(addr *deferred.Deferred[string]) testservice.InstrumentationFunc

Types

type ClickhouseDriver

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

func (*ClickhouseDriver) Clear

func (h *ClickhouseDriver) Clear(ctx context.Context) error

func (*ClickhouseDriver) Config

func (h *ClickhouseDriver) Config() map[string]any

func (*ClickhouseDriver) Name

func (h *ClickhouseDriver) Name() string

func (*ClickhouseDriver) ReadMessages

func (h *ClickhouseDriver) ReadMessages(ctx context.Context) ([]drivers.LogWithLedger, error)

type Collector

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

func NewCollector

func NewCollector() *Collector

type Driver

type Driver interface {
	Config() map[string]any
	Name() string
	ReadMessages(ctx context.Context) ([]drivers.LogWithLedger, error)
	Clear(ctx context.Context) error
}

func NewClickhouseDriver

func NewClickhouseDriver(logger logging.Logger, dsn string) Driver

func NewElasticDriver

func NewElasticDriver(endpoint string) Driver

func NewHTTPDriver

func NewHTTPDriver(t interface {
	require.TestingT
	Cleanup(func())
}, collector *Collector) Driver

type ElasticDriver

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

func (*ElasticDriver) Clear

func (h *ElasticDriver) Clear(ctx context.Context) error

func (*ElasticDriver) Config

func (h *ElasticDriver) Config() map[string]any

func (*ElasticDriver) Name

func (h *ElasticDriver) Name() string

func (*ElasticDriver) ReadMessages

func (h *ElasticDriver) ReadMessages(ctx context.Context) ([]drivers.LogWithLedger, error)

type HTTPDriver

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

func (*HTTPDriver) Clear

func (h *HTTPDriver) Clear(_ context.Context) error

func (*HTTPDriver) Config

func (h *HTTPDriver) Config() map[string]any

func (*HTTPDriver) Name

func (h *HTTPDriver) Name() string

func (*HTTPDriver) ReadMessages

func (h *HTTPDriver) ReadMessages(_ context.Context) ([]drivers.LogWithLedger, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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