Documentation
¶
Index ¶
- Constants
- func BootstrapAddresses(bootstrapHost p2p.Node) []string
- func NewDefaultBadger(path string) (datastore.Batching, error)
- func NewS3(hsc *HumanStorageConfig) (datastore.Batching, error)
- type Config
- type HumanConfig
- type HumanPrivateKeySet
- type HumanStorageConfig
- type LegacyPrivateKeySet
- type LegacyPublicKeySet
- type LocalNetwork
- type NoDialWebSocketTransport
- type NodeBuilder
- type PrivateKeySet
- type TracingSystem
Constants ¶
View Source
const MULTIADDR_WSS_CODE = 0x01DE
Variables ¶
This section is empty.
Functions ¶
func BootstrapAddresses ¶
func NewDefaultBadger ¶
NewDefaultBadger is a convenience function to produce our "standard" badger with the optional low memory mode
Types ¶
type Config ¶
type Config struct {
Namespace string
Gossip3NotaryGroupConfig *g3types.Config
NotaryGroupConfig *types.Config
PublicIP string
Port int
WebSocketPort int
SecureWebSocketDomain string
CertificateCache string
PrivateKeySet *PrivateKeySet
BootstrapNodes []string
TracingSystem TracingSystem // either Jaeger or Elastic
BootstrapOnly bool
Blockstore blockstore.Blockstore
Datastore datastore.Batching
}
func HumanConfigToConfig ¶
func HumanConfigToConfig(hc HumanConfig) (*Config, error)
func TomlToConfig ¶
TomlToConfig will load a config from a path to a toml file
type HumanConfig ¶
type HumanConfig struct {
Namespace string
NotaryGroupConfig string
Gossip3NotaryGroupConfig string
PublicIP string
Port int
Storage HumanStorageConfig
WebSocketPort int
SecureWebSocketDomain string // only available on port 443
CertificateCache string
PrivateKeySet *HumanPrivateKeySet
BootstrapOnly bool
TracingSystem string
}
HumanConfig is used for parsing an ondisk configuration into the application-used Config struct. At the time of this comment, it also uses the types.HumanConfig for notary groups defined in the tupelo-go-sdk as well.
type HumanPrivateKeySet ¶
func (*HumanPrivateKeySet) ToPrivateKeySet ¶
func (hpks *HumanPrivateKeySet) ToPrivateKeySet() (*PrivateKeySet, error)
type HumanStorageConfig ¶
type HumanStorageConfig struct {
Kind string
Path string // for badger
// CacheSize defaults to 100 (when set to 0), use -1 for no cache
// only used for the blockstore
CacheSize int
// remaining are For s3
RegionEndpoint string
Bucket string
Region string
AccessKey string
SecretKey string
LocalS3 bool
RootDirectory string
}
func (*HumanStorageConfig) ToBlockstore ¶
func (hsc *HumanStorageConfig) ToBlockstore() (blockstore.Blockstore, error)
func (*HumanStorageConfig) ToDatastore ¶
func (hsc *HumanStorageConfig) ToDatastore() (datastore.Batching, error)
type LegacyPrivateKeySet ¶
type LegacyPrivateKeySet struct {
BlsHexPrivateKey string `json:"blsHexPrivateKey,omitempty"`
EcdsaHexPrivateKey string `json:"ecdsaHexPrivateKey,omitempty"`
}
func (*LegacyPrivateKeySet) ToPrivateKeySet ¶
func (lpks *LegacyPrivateKeySet) ToPrivateKeySet() (*PrivateKeySet, error)
type LegacyPublicKeySet ¶
type LegacyPublicKeySet struct {
BlsHexPublicKey string `json:"blsHexPublicKey,omitempty"`
EcdsaHexPublicKey string `json:"ecdsaHexPublicKey,omitempty"`
PeerIDBase58Key string `json:"peerIDBase58Key,omitempty"`
}
func (*LegacyPublicKeySet) ToPublicKeySet ¶
func (lpks *LegacyPublicKeySet) ToPublicKeySet() (*types.PublicKeySet, error)
type LocalNetwork ¶
type LocalNetwork struct {
Builders []*NodeBuilder
Nodes []p2p.Node
ClientNode p2p.Node
BootstrapNode p2p.Node
BootstrapAddrrs []string
NotaryGroup *types.NotaryGroup
}
func NewLocalNetwork ¶
func NewLocalNetwork(ctx context.Context, namespace string, keys []*PrivateKeySet, ngConfig *types.Config) (*LocalNetwork, error)
func (*LocalNetwork) BootstrappedP2PNode ¶
type NoDialWebSocketTransport ¶
type NoDialWebSocketTransport struct {
*ws.WebsocketTransport
}
NoDialWebSocketTransport is a thin wrapper around the websocket transport but does not allow actually *dialing* the peer
func NewNoDialWebsocketTransport ¶
func NewNoDialWebsocketTransport(u *tptu.Upgrader) *NoDialWebSocketTransport
NewNoDialWebsocketTransport wraps the standard go-ws-transport New to return the non-dialing version
type NodeBuilder ¶
type NodeBuilder struct {
Config *Config
// contains filtered or unexported fields
}
func (*NodeBuilder) Actor ¶
func (nb *NodeBuilder) Actor() *actor.PID
func (*NodeBuilder) Host ¶
func (nb *NodeBuilder) Host() p2p.Node
func (*NodeBuilder) NotaryGroup ¶
func (nb *NodeBuilder) NotaryGroup() (*types.NotaryGroup, error)
func (*NodeBuilder) StartTracing ¶
func (nb *NodeBuilder) StartTracing()
func (*NodeBuilder) Stop ¶
func (nb *NodeBuilder) Stop() error
type PrivateKeySet ¶
type PrivateKeySet struct {
SignKey *bls.SignKey
DestKey *ecdsa.PrivateKey
}
type TracingSystem ¶
type TracingSystem int
const ( NoTracing TracingSystem = iota JaegerTracing ElasticTracing )
Click to show internal directories.
Click to hide internal directories.