Versions in this module Expand all Collapse all v0 v0.6.2 Nov 1, 2018 Changes in this version + const CtxTableIndex + const DefaultHostID + func AuthenticationRequest(hostHandler hosthandler.HostHandler, command, targetID string) error + func BuildContext(cb ContextBuilder, msg *packet.Packet) hosthandler.Context + func CascadeSendMessage(hostHandler hosthandler.HostHandler, data core.Cascade, targetID string, ...) error + func CheckOriginRequest(hostHandler hosthandler.HostHandler, targetID string) error + func CreateDHTContext(handler hosthandler.HostHandler) hosthandler.Context + func DispatchPacketType(hostHandler hosthandler.HostHandler, ctx hosthandler.Context, ...) (*packet.Packet, error) + func GetDefaultCtx(hostHandler hosthandler.HostHandler) hosthandler.Context + func GetNonceRequest(hostHandler hosthandler.HostHandler, targetID string) ([]*core.Node, error) + func NewDhtHostNetwork(conf configuration.Configuration, certificate core.Certificate, ...) (network.HostNetwork, error) + func NewDhtNetworkController(network network.HostNetwork) (network.Controller, error) + func NewNetworkConsensus(network network.HostNetwork) consensus.Processor + func ObtainIPRequest(hostHandler hosthandler.HostHandler, targetID string) error + func ParseIncomingPacket(hostHandler hosthandler.HostHandler, ctx hosthandler.Context, ...) (*packet.Packet, error) + func RelayOwnershipRequest(hostHandler hosthandler.HostHandler, targetID string) error + func RelayRequest(hostHandler hosthandler.HostHandler, command, targetID string) error + func ResendPulseToKnownHosts(hostHandler hosthandler.HostHandler, hosts []host.Host, ...) + func SendRelayOwnership(hostHandler hosthandler.HostHandler, subnetIDs []string) + type AuthInfo struct + AuthenticatedHosts map[string]bool + ReceivedKeys map[string][]byte + SentKeys map[string][]byte + type ContextBuilder struct + func NewContextBuilder(hostHandler hosthandler.HostHandler) ContextBuilder + func (cb ContextBuilder) Build() (ctx hosthandler.Context, err error) + func (cb ContextBuilder) SetDefaultHost() ContextBuilder + func (cb ContextBuilder) SetHostByID(hostID id.ID) ContextBuilder + type DHT struct + func NewDHT(store store.Store, origin *host.Origin, transport transport.Transport, ...) (dht *DHT, err error) + func NewHostNetwork(cfg configuration.Configuration, cascade *cascade.Cascade, ...) (*DHT, error) + func (dht *DHT) AddActiveNodes(activeNodes []*core.Node) error + func (dht *DHT) AddAuthSentKey(id string, key []byte) + func (dht *DHT) AddHost(ctx hosthandler.Context, host *routing.RouteHost) + func (dht *DHT) AddPossibleProxyID(id string) + func (dht *DHT) AddPossibleRelayID(id string) + func (dht *DHT) AddProxyHost(targetID string) + func (dht *DHT) AddReceivedKey(target string, key []byte) + func (dht *DHT) AddRelayClient(host *host.Host) error + func (dht *DHT) AddSubnetID(ip, targetID string) + func (dht *DHT) AddUnsync(nodeID core.RecordRef, roles []core.NodeRole, address string, version string) (chan *core.Node, error) + func (dht *DHT) AnalyzeNetwork(ctx hosthandler.Context) error + func (dht *DHT) Bootstrap() error + func (dht *DHT) CascadeSendMessage(data core.Cascade, targetID string, method string, args [][]byte) error + func (dht *DHT) CheckNodeRole(domainID string) error + func (dht *DHT) ConfirmNodeRole(roleKey string) bool + func (dht *DHT) Disconnect() + func (dht *DHT) EqualAuthSentKey(targetID string, key []byte) bool + func (dht *DHT) FindHost(ctx hosthandler.Context, key string) (*host.Host, bool, error) + func (dht *DHT) Get(ctx hosthandler.Context, key string) ([]byte, bool, error) + func (dht *DHT) GetActiveNodesList() []*core.Node + func (dht *DHT) GetExpirationTime(ctx hosthandler.Context, key []byte) time.Time + func (dht *DHT) GetHighKnownHostID() string + func (dht *DHT) GetHostsFromBootstrap() + func (dht *DHT) GetNetworkCommonFacade() hosthandler.NetworkCommonFacade + func (dht *DHT) GetNodeID() core.RecordRef + func (dht *DHT) GetOriginHost() *host.Origin + func (dht *DHT) GetOuterHostsCount() int + func (dht *DHT) GetPacketTimeout() time.Duration + func (dht *DHT) GetPrivateKey() *ecdsa.PrivateKey + func (dht *DHT) GetProxyHostsCount() int + func (dht *DHT) GetReplicationTime() time.Duration + func (dht *DHT) GetSelfKnownOuterHosts() int + func (dht *DHT) HostIsAuthenticated(targetID string) bool + func (dht *DHT) HtFromCtx(ctx hosthandler.Context) *routing.HashTable + func (dht *DHT) InvokeRPC(sender *host.Host, method string, args [][]byte) ([]byte, error) + func (dht *DHT) KeyIsReceived(key string) ([]byte, bool) + func (dht *DHT) Listen() error + func (dht *DHT) NumHosts(ctx hosthandler.Context) int + func (dht *DHT) ObtainIP() error + func (dht *DHT) RemoteProcedureCall(ctx hosthandler.Context, targetID string, method string, args [][]byte) (result []byte, err error) + func (dht *DHT) RemoteProcedureRegister(name string, method core.RemoteProcedure) + func (dht *DHT) RemoveAuthHost(key string) + func (dht *DHT) RemoveAuthSentKeys(targetID string) + func (dht *DHT) RemovePossibleProxyID(id string) + func (dht *DHT) RemoveProxyHost(targetID string) + func (dht *DHT) RemoveRelayClient(host *host.Host) error + func (dht *DHT) SendRequest(packet *packet.Packet) (transport.Future, error) + func (dht *DHT) SetAuthStatus(targetID string, status bool) + func (dht *DHT) SetHighKnownHostID(id string) + func (dht *DHT) SetNodeKeeper(keeper network.NodeKeeper) + func (dht *DHT) SetOuterHostsCount(hosts int) + func (dht *DHT) StartAuthorize() error + func (dht *DHT) Store(key store.Key, data []byte, replication time.Time, expiration time.Time, ...) error + func (dht *DHT) StoreData(ctx hosthandler.Context, data []byte) (id string, err error) + func (dht *DHT) StoreRetrieve(key store.Key) ([]byte, bool) + type HighKnownOuterHostsHost struct + ID string + OuterHosts int + SelfKnownOuterHosts int + type MockLedger struct + func (l *MockLedger) GetArtifactManager() core.ArtifactManager + func (l *MockLedger) GetJetCoordinator() core.JetCoordinator + func (l *MockLedger) GetPulseManager() core.PulseManager + type MockPulseManager struct + func (pm *MockPulseManager) Current(context.Context) (*core.Pulse, error) + func (pm *MockPulseManager) Set(ctx context.Context, pulse core.Pulse) error + func (pm *MockPulseManager) SetCallback(callback func(core.Pulse)) + type Options struct + BootstrapHosts []*host.Host + ExpirationTime time.Duration + PacketTimeout time.Duration + PingTimeout time.Duration + RefreshTime time.Duration + ReplicateTime time.Duration + RepublishTime time.Duration + type Subnet struct + HighKnownHosts HighKnownOuterHostsHost + HomeSubnetKey string + PossibleProxyIDs []string + PossibleRelayIDs []string + SubnetIDs map[string][]string + type Wrapper struct + HostNetwork hosthandler.HostHandler + func (w *Wrapper) AnalyzeNetwork() error + func (w *Wrapper) Authorize() error + func (w *Wrapper) Bootstrap() error + func (w *Wrapper) BuildResponse(request network.Request, responseData interface{}) network.Response + func (w *Wrapper) GetConsensus() consensus.Processor + func (w *Wrapper) GetNodeID() core.RecordRef + func (w *Wrapper) Inject(components core.Components) + func (w *Wrapper) NewRequestBuilder() network.RequestBuilder + func (w *Wrapper) PublicAddress() string + func (w *Wrapper) RegisterRequestHandler(t types.PacketType, handler network.RequestHandler) + func (w *Wrapper) RemoteProcedureRegister(name string, method core.RemoteProcedure) + func (w *Wrapper) ResendPulseToKnownHosts(pulse core.Pulse) + func (w *Wrapper) SendCascadeMessage(data core.Cascade, method string, msg core.SignedMessage) error + func (w *Wrapper) SendMessage(nodeID core.RecordRef, method string, msg core.SignedMessage) ([]byte, error) + func (w *Wrapper) SendRequest(network.Request, core.RecordRef) (network.Future, error) + func (w *Wrapper) Start() + func (w *Wrapper) Stop()