Versions in this module Expand all Collapse all v0 v0.0.5 Sep 25, 2023 v0.0.4 Sep 19, 2023 v0.0.3 Sep 18, 2023 Changes in this version + const MsgIDErrorResponse + const MsgIDNoResponse + func ErrorResponse(err error) (uint32, []byte, error) + func FSM() *bzgncmap.Map[string, *IPState] + func New(address string, routerMap RouterMap, fs map[uint32]NoticeFunc[NI], ...) error + func NoResponse() (uint32, []byte, error) + func Response(msgID uint32, data []byte) (uint32, []byte, error) + type BizLog struct + func WrapLog(logger *bzzap.Log, typ string) *BizLog + func (l *BizLog) Debug(msg string, err error) + func (l *BizLog) Error(msg string, err error) + func (l *BizLog) Fatal(msg string, err error) + func (l *BizLog) Info(msg string, err error) + func (l *BizLog) Panic(msg string, err error) + func (l *BizLog) Warn(msg string, err error) + type IPState struct + Cancel context.CancelFunc + EndTime int64 + IP string + Info any + RespChan chan *protofile.LogicResponse + WriteTimer int64 + type NoticeFunc func(ctx context.Context, msgID uint32, info *NoticeInfo[I]) + type NoticeInfo struct + IP string + Info I + ResChan chan *protofile2.LogicResponse + func (n *NoticeInfo[I]) NoticeSend(done bool, f func()) + type RouterMap map[uint32]func(context.Context, []byte) (uint32, []byte, error) + type Service struct + func (s *Service[SI, NI]) Notice(ctx context.Context, ip string, info NI) + func (s *Service[SI, NI]) Send(ss protofile2.LogicService_SendServer) error + func (s *Service[SI, NI]) SendNotice(ctx context.Context, ip string, ss protofile2.LogicService_SendServer) error