Documentation ¶
Index ¶
- Variables
- type Config
- type Discovery
- func (discovery *Discovery) Close() error
- func (d *Discovery) ConnFailure(ctx context.Context, node *pb.Node, err error)
- func (d *Discovery) ConnSuccess(ctx context.Context, node *pb.Node)
- func (d *Discovery) GracefulDisconnect(id storj.NodeID)
- func (discovery *Discovery) Run(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Error is a general error class of this package Error = errs.Class("discovery error") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { RefreshInterval time.Duration `help:"the interval at which the cache refreshes itself in seconds" default:"1s"` GraveyardInterval time.Duration `help:"the interval at which the the graveyard tries to resurrect nodes" default:"30s"` DiscoveryInterval time.Duration `help:"the interval at which the satellite attempts to find new nodes via random node ID lookups" default:"1s"` RefreshLimit int `help:"the amount of nodes refreshed at each interval" default:"100"` }
Config loads on the configuration values for the cache
type Discovery ¶
type Discovery struct { Refresh sync2.Cycle Graveyard sync2.Cycle Discovery sync2.Cycle // contains filtered or unexported fields }
Discovery struct loads on cache, kad
func (*Discovery) ConnFailure ¶
ConnFailure implements the Transport Observer interface `ConnFailure` function
func (*Discovery) ConnSuccess ¶
ConnSuccess implements the Transport Observer interface `ConnSuccess` function
func (*Discovery) GracefulDisconnect ¶
GracefulDisconnect is called when a node alerts the network they're going offline for a short period of time with intent to come back
Click to show internal directories.
Click to hide internal directories.