Documentation ¶
Index ¶
- func GenerateSelfSigned(privKey crypto.Signer) tls.Certificate
- type AskHub
- func (q *AskHub[A]) Close() error
- func (q *AskHub[A]) CloseWithError(err error)
- func (q *AskHub[A]) Deliver(ctx context.Context, respData []byte, msg p2p.Message[A]) (int, error)
- func (q *AskHub[A]) ServeAsk(ctx context.Context, fn func(context.Context, []byte, p2p.Message[A]) int) error
- func (q *AskHub[A]) String() string
- type ErrList
- type LimitWriter
- type Queue
- func (q *Queue[A]) Cap() int
- func (q *Queue[A]) Close() error
- func (q *Queue[A]) Deliver(m p2p.Message[A]) bool
- func (q *Queue[A]) DeliverVec(src, dst A, v p2p.IOVec) bool
- func (q *Queue[A]) IsClosed() bool
- func (q *Queue[A]) Len() int
- func (q *Queue[A]) Purge() (count int)
- func (q *Queue[A]) Receive(ctx context.Context, fn func(p2p.Message[A])) error
- type TellHub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSelfSigned ¶
func GenerateSelfSigned(privKey crypto.Signer) tls.Certificate
Types ¶
type AskHub ¶
type AskHub[A p2p.Addr] struct {
// contains filtered or unexported fields
}
func (*AskHub[A]) CloseWithError ¶
type LimitWriter ¶
type Queue ¶
type Queue[A p2p.Addr] struct {
// contains filtered or unexported fields
}
func (*Queue[A]) Deliver ¶
Deliver does not block. It immediately returns true if the message was accepted. Reasons for refusing the message could be that the queue is full, closed, or the message exceeds the mtu.
func (*Queue[A]) DeliverVec ¶
type TellHub ¶
type TellHub[A p2p.Addr] struct {
// contains filtered or unexported fields
}
func NewTellHub ¶
func NewTellHub[A p2p.Addr]() TellHub[A]
func (*TellHub[A]) CloseWithError ¶
Click to show internal directories.
Click to hide internal directories.