services

package
v0.0.0-...-af36406 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountActivityCursorManager

type AccountActivityCursorManager struct {
	AccountId string
	// contains filtered or unexported fields
}

func NewCursorManagerForAccountActivity

func NewCursorManagerForAccountActivity(store index.Store, accountId string) *AccountActivityCursorManager

func (*AccountActivityCursorManager) Advance

func (c *AccountActivityCursorManager) Advance(times uint) (int64, error)

func (*AccountActivityCursorManager) Begin

func (c *AccountActivityCursorManager) Begin(cursor int64) (int64, error)

type Config

type Config struct {
	Ingester   ingester.Ingester
	IndexStore index.Store
	Passphrase string
	Metrics    Metrics
}

type CursorManager

type CursorManager interface {
	Begin(cursor int64) (int64, error)
	Advance(times uint) (int64, error)
}

CursorManager describes a way to control how a cursor advances for a particular indexing strategy.

type LightAurora

type LightAurora struct {
	Operations   OperationService
	Transactions TransactionService
}

type Metrics

type Metrics struct {
	ResponseAgeHistogram *prometheus.HistogramVec
}

func NewMetrics

func NewMetrics(registry *prometheus.Registry) Metrics

NewMetrics returns a Metrics instance containing all the prometheus metrics necessary for running light aurora services.

type MockOperationService

type MockOperationService struct {
	mock.Mock
}

func (*MockOperationService) GetOperationsByAccount

func (m *MockOperationService) GetOperationsByAccount(ctx context.Context,
	cursor int64, limit uint64,
	accountId string,
) ([]common.Operation, error)

type MockTransactionService

type MockTransactionService struct {
	mock.Mock
}

func (*MockTransactionService) GetTransactionsByAccount

func (m *MockTransactionService) GetTransactionsByAccount(ctx context.Context,
	cursor int64, limit uint64,
	accountId string,
) ([]common.Transaction, error)

type OperationRepository

type OperationRepository struct {
	OperationService
	Config Config
}

func (*OperationRepository) GetOperationsByAccount

func (or *OperationRepository) GetOperationsByAccount(ctx context.Context,
	cursor int64, limit uint64,
	accountId string,
) ([]common.Operation, error)

type OperationService

type OperationService interface {
	GetOperationsByAccount(ctx context.Context,
		cursor int64, limit uint64,
		accountId string,
	) ([]common.Operation, error)
}

type TransactionRepository

type TransactionRepository struct {
	TransactionService
	Config Config
}

func (*TransactionRepository) GetTransactionsByAccount

func (tr *TransactionRepository) GetTransactionsByAccount(ctx context.Context,
	cursor int64, limit uint64,
	accountId string,
) ([]common.Transaction, error)

type TransactionService

type TransactionService interface {
	GetTransactionsByAccount(ctx context.Context,
		cursor int64, limit uint64,
		accountId string,
	) ([]common.Transaction, error)
}

Jump to

Keyboard shortcuts

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