grpc

package
v0.0.0-...-a9c8dba Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOffchainUpdatesV1

func GetOffchainUpdatesV1(offchainUpdates *clobtypes.OffchainUpdates) ([]ocutypes.OffChainUpdateV1, error)

GetOffchainUpdatesV1 unmarshals messages in offchain updates to OffchainUpdateV1.

Types

type GrpcStreamingManagerImpl

type GrpcStreamingManagerImpl struct {
	sync.Mutex
	// contains filtered or unexported fields
}

GrpcStreamingManagerImpl is an implementation for managing gRPC streaming subscriptions.

func NewGrpcStreamingManager

func NewGrpcStreamingManager() *GrpcStreamingManagerImpl

func (*GrpcStreamingManagerImpl) Enabled

func (sm *GrpcStreamingManagerImpl) Enabled() bool

func (*GrpcStreamingManagerImpl) GetUninitializedClobPairIds

func (sm *GrpcStreamingManagerImpl) GetUninitializedClobPairIds() []uint32

GetUninitializedClobPairIds returns the clob pair ids that have not been initialized.

func (*GrpcStreamingManagerImpl) SendOrderbookUpdates

func (sm *GrpcStreamingManagerImpl) SendOrderbookUpdates(
	offchainUpdates *clobtypes.OffchainUpdates,
	snapshot bool,
	blockHeight uint32,
	execMode sdk.ExecMode,
)

SendOrderbookUpdates groups updates by their clob pair ids and sends messages to the subscribers.

func (*GrpcStreamingManagerImpl) Subscribe

Subscribe subscribes to the orderbook updates stream.

type NoopGrpcStreamingManager

type NoopGrpcStreamingManager struct{}

func NewNoopGrpcStreamingManager

func NewNoopGrpcStreamingManager() *NoopGrpcStreamingManager

func (*NoopGrpcStreamingManager) Enabled

func (sm *NoopGrpcStreamingManager) Enabled() bool

func (*NoopGrpcStreamingManager) GetUninitializedClobPairIds

func (sm *NoopGrpcStreamingManager) GetUninitializedClobPairIds() []uint32

func (*NoopGrpcStreamingManager) SendOrderbookUpdates

func (sm *NoopGrpcStreamingManager) SendOrderbookUpdates(
	updates *clobtypes.OffchainUpdates,
	snapshot bool,
	blockHeight uint32,
	execMode sdk.ExecMode,
)

func (*NoopGrpcStreamingManager) Subscribe

type OrderbookSubscription

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

OrderbookSubscription represents a active subscription to the orderbook updates stream.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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