Documentation ¶
Overview ¶
nolint:nakedret,dupl
nolint:nakedret
nolint:nakedret
nolint:nakedret
nolint:nakedret
nolint:nakedret,dupl
nolint:nakedret,dupl
Index ¶
- Constants
- func IsAllowed() bool
- type API
- func (api *API) GetClientModes() map[string]BitbonClientMode
- func (api *API) GetCurrentMode() BitbonClientMode
- func (api *API) GetHandlerKeys() []string
- func (api *API) GetJournal() ([]*amqp.Publishing, error)
- func (api *API) GetPoolError(key string) (map[int]map[string]interface{}, error)
- func (api *API) GetPoolErrors() (map[string]map[int]map[string]interface{}, error)
- func (api *API) GetPoolSize(key string) (int, error)
- func (api *API) GetPoolSizes() (map[string]int, error)
- func (api *API) SetPoolSize(key string, n int) error
- func (api *API) Version(_ context.Context) string
- type BitbonClientMode
- type Client
- type Config
- type Pool
- type Worker
Constants ¶
View Source
const ( ProtocolVersionStr = "1.0.0" // The same, as a string ProtocolName = "bitbonclient" // Nickname of the protocol in geth DefaultJournalName = ".bitbon.client.journal.LDB" DefaultJournalTimeout = 10 * time.Minute DefaultConfirmTimeout = 5 * time.Second DefaultPublishTimeout = 3 * time.Second DefaultAssetboxExchange = "e.assetbox.forward" DefaultTransferExchange = "e.transfer.forward" DefaultBlockExchange = "e.block.forward" DefaultTransactionExchange = "e.transaction.forward" DefaultMiningExchange = "e.mining.forward" DefaultFeeExchange = "e.fee.forward" LastErrorCleanInterval = 20 * time.Second )
Bitbon constants
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API provides the bitbon bitbon RPC service
func (*API) GetClientModes ¶
func (api *API) GetClientModes() map[string]BitbonClientMode
func (*API) GetCurrentMode ¶
func (api *API) GetCurrentMode() BitbonClientMode
func (*API) GetHandlerKeys ¶
func (*API) GetJournal ¶
func (api *API) GetJournal() ([]*amqp.Publishing, error)
func (*API) GetPoolError ¶
func (*API) GetPoolErrors ¶
type BitbonClientMode ¶
type BitbonClientMode int
const ( BitbonClientUndefinedMode BitbonClientMode = iota BitbonClientAllMode BitbonClientMutableMode BitbonClientReadableMode )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetJournal ¶
func (c *Client) GetJournal() *bitbonAmqp.PublishJournal
type Config ¶
type Config struct { Enabled bool Mode BitbonClientMode WaitSync bool // if WaitSync is true client won`t start until sync is not finished AmqpConnStrs []string AmqpAssetboxExchange string AmqpTransferExchange string AmqpConfirmTimeout time.Duration AmqpPublishTimeout time.Duration JournalTimeout time.Duration JournalName string AmqpBlockExchange string AmqpTransactionExchange string AmqpMiningExchange string AmqpFeeExchange string }
Config represents the configuration state of a bitbon agent service.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool is a struct that manages a collection of workers, each with their own goroutine.
func NewPool ¶
New creates a new Pool of workers. You must provide a constructor function that creates new Worker types and when you change the size of the pool the constructor will be called to create each new Worker.
Click to show internal directories.
Click to hide internal directories.