Documentation ¶
Index ¶
- Constants
- Variables
- type Meta
- type Network
- func (swarm *Network) Del(_ context.Context, key string) (err error)
- func (swarm *Network) GetBroadcasts(overhead, limit int) (broadcasts [][]byte)
- func (swarm *Network) Join(addresses []string) (success int, err error)
- func (swarm *Network) KeyOwners(key string) (nodes []clash.Node)
- func (swarm *Network) LocalState(join bool) (bytes []byte)
- func (swarm *Network) MergeRemoteState(_ []byte, _ bool)
- func (swarm *Network) Name() string
- func (swarm *Network) NodeMeta(limit int) (bytes []byte)
- func (swarm *Network) NotifyJoin(node *memberlist.Node)
- func (swarm *Network) NotifyLeave(node *memberlist.Node)
- func (swarm *Network) NotifyMsg(bytes []byte)
- func (swarm *Network) NotifyUpdate(node *memberlist.Node)
- func (swarm *Network) OnDel(handler func(ctx context.Context, key string))
- func (swarm *Network) OnGet(...)
- func (swarm *Network) OnRebase(handler func(ctx context.Context))
- func (swarm *Network) OnSet(...)
- func (swarm *Network) OnStats(handler func(ctx context.Context) clash.Stats)
- func (swarm *Network) Set(_ context.Context, key string, value []byte, expiredAt time.Time) (err error)
- func (swarm *Network) Start() (err error)
- func (swarm *Network) Stats(ctx context.Context) (stats map[string]clash.Stats)
- type Node
- type Option
Constants ¶
View Source
const (
TypeStats
)
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrTimeout = errors.New("timeout")
Functions ¶
This section is empty.
Types ¶
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
func (*Network) GetBroadcasts ¶
func (*Network) LocalState ¶
func (*Network) MergeRemoteState ¶
func (*Network) NotifyJoin ¶
func (swarm *Network) NotifyJoin(node *memberlist.Node)
func (*Network) NotifyLeave ¶
func (swarm *Network) NotifyLeave(node *memberlist.Node)
func (*Network) NotifyUpdate ¶
func (swarm *Network) NotifyUpdate(node *memberlist.Node)
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) GetTransport ¶
type Option ¶
type Option func(swarm *Network)
func SetBufferSize ¶
func SetReplicaFactor ¶
func WithCompression ¶
Click to show internal directories.
Click to hide internal directories.