server

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	rootAccountKP *keypair.Full,
	horizonClient horizon.ClientInterface,
	accountNotifier *AccountNotifier,
	limiter *redis_rate.Limiter,
	channelPool channel.Pool,
	c *Config,
) (accountpb.AccountServer, error)

New returns a new account server

Types

type AccountNotifier

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

func NewAccountNotifier

func NewAccountNotifier(hClient horizon.ClientInterface) *AccountNotifier

func (*AccountNotifier) AddStream

func (a *AccountNotifier) AddStream(accountID string, stream *eventStream)

AddStream adds a stream to the notifier.

func (*AccountNotifier) OnTransaction

func (a *AccountNotifier) OnTransaction(xdrData transaction.XDRData)

OnTransaction implements transaction.Notifier.OnTransaction

func (*AccountNotifier) RemoveStream

func (a *AccountNotifier) RemoveStream(accountID string, stream *eventStream)

RemoveStream removes a stream from the notifier.

type Config

type Config struct {
	// CreateAccountGlobalLimit is the number of CreateAccount requests allowed globally per second.
	//
	// A value <= 0 indicates that no rate limit is to be applied.
	CreateAccountGlobalLimit int
}

Jump to

Keyboard shortcuts

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