Documentation ¶
Index ¶
- func MapMessageInfo(m []byte) (*sdk.WsMessageInfo, error)
- type Mapper
- type MapperFunc
- type MockSubscribersPool
- func (_m *MockSubscribersPool[T]) CloseSubscription(path *Path, id int)
- func (_m *MockSubscribersPool[T]) GetPaths() []string
- func (_m *MockSubscribersPool[T]) HasSubscriptions(path *Path) bool
- func (_m *MockSubscribersPool[T]) NewSubscription(path *Path) (<-chan T, int)
- func (_m *MockSubscribersPool[T]) Notify(ctx context.Context, path *Path, payload []byte) error
- type Notifier
- type Path
- type Publisher
- type SubscribersPool
- type Topic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapMessageInfo ¶
func MapMessageInfo(m []byte) (*sdk.WsMessageInfo, error)
Types ¶
type MapperFunc ¶
type MockSubscribersPool ¶
MockMessagePublisher is an autogenerated mock type for the MessagePublisher type
func (*MockSubscribersPool[T]) CloseSubscription ¶
func (_m *MockSubscribersPool[T]) CloseSubscription(path *Path, id int)
func (*MockSubscribersPool[T]) GetPaths ¶
func (_m *MockSubscribersPool[T]) GetPaths() []string
func (*MockSubscribersPool[T]) HasSubscriptions ¶
func (_m *MockSubscribersPool[T]) HasSubscriptions(path *Path) bool
func (*MockSubscribersPool[T]) NewSubscription ¶
func (_m *MockSubscribersPool[T]) NewSubscription(path *Path) (<-chan T, int)
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
func PathFromWsMessageInfo ¶
func PathFromWsMessageInfo(info *sdk.WsMessageInfo) *Path
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func NewPublisher() *Publisher
func (*Publisher) AddSubscriber ¶
type SubscribersPool ¶
type SubscribersPool[T any] interface { Notifier NewSubscription(path *Path) (_ <-chan T, id int) CloseSubscription(path *Path, id int) GetPaths() []string HasSubscriptions(path *Path) bool }
func NewSubscribersPool ¶
func NewSubscribersPool[T any](mapper Mapper[T]) SubscribersPool[T]
type Topic ¶
type Topic string
const ( TopicBlock Topic = "block" TopicConfirmedAdded Topic = "confirmedAdded" TopicUnconfirmedAdded Topic = "unconfirmedAdded" TopicUnconfirmedRemoved Topic = "unconfirmedRemoved" TopicStatus Topic = "status" TopicPartialAdded Topic = "partialAdded" TopicPartialRemoved Topic = "partialRemoved" TopicCosignature Topic = "cosignature" TopicDriveState Topic = "driveState" )
Click to show internal directories.
Click to hide internal directories.