Documentation ¶
Index ¶
- type Manager
- func (pm *Manager) DeRegister(ctx context.Context, peerID string) error
- func (pm *Manager) Get(ctx context.Context, peerID string) (*types.PeerInfo, error)
- func (pm *Manager) List(ctx context.Context, filter *dutil.PageFilter) (peerList []*types.PeerInfo, err error)
- func (pm *Manager) Register(ctx context.Context, peerCreateRequest *types.PeerCreateRequest) (peerCreateResponse *types.PeerCreateResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is an implement of the interface of PeerMgr.
func (*Manager) DeRegister ¶
DeRegister a peer from p2p network.
func (*Manager) List ¶
func (pm *Manager) List(ctx context.Context, filter *dutil.PageFilter) ( peerList []*types.PeerInfo, err error)
List returns all filtered peerInfo by filter.
func (*Manager) Register ¶
func (pm *Manager) Register(ctx context.Context, peerCreateRequest *types.PeerCreateRequest) (peerCreateResponse *types.PeerCreateResponse, err error)
Register a peer and generate a unique ID as returned.
Click to show internal directories.
Click to hide internal directories.