Versions in this module Expand all Collapse all v0 v0.1.0 Jul 7, 2026 Changes in this version + const AllProducers + const DefaultPort + const EventAll + func ConsumeEventName(producer, event, scope string) string + func NewAuthDecideReq(adminToken, requestID string, approved bool, role, reason string) map[string]interface + func NewAuthNextReq(adminToken, realmFilter string) map[string]interface + type AckReq struct + MsgID string + type AdminProof struct + Nonce string + Signature string + Timestamp int64 + func CreateAdminProof(adminToken, action string, body interface{}) AdminProof + type AuthFail struct + Code int + Message string + type AuthOK struct + Realm string + Role string + type AuthenticationReq struct + Token string + type AuthorizationApproved struct + Realm string + RequestID string + Role string + type AuthorizationDecideResult struct + OK bool + Request *PendingAuthRequest + type AuthorizationNextResult struct + OK bool + Request *PendingAuthRequest + type AuthorizationRejected struct + Reason string + RequestID string + type AuthorizationRequest struct + ChallengeResponse interface{} + ClientID string + ClientName string + ClientToken string + Realm string + Role string + type AuthorizationRequestOK struct + OK bool + RequestID string + Status string + type Client struct + func NewClient(serverURL string, log *slog.Logger) *Client + func NewClientNS(serverURL, namespace string, log *slog.Logger) *Client + func (c *Client) Ack(msgID string) error + func (c *Client) Authenticate(ctx context.Context, token string) error + func (c *Client) Close() + func (c *Client) Connect(ctx context.Context, ready chan<- struct{}) error + func (c *Client) Emit(event string, payload interface{}) error + func (c *Client) On(event string, h Handler) + func (c *Client) Produce(from, event string, message interface{}) error + func (c *Client) RegisterConsumer(name string) error + func (c *Client) RegisterProducer(name string) error + func (c *Client) Subscribe(req SubscribeReq, handler func(ConsumedMessage)) error + func (c *Client) WaitFor(event string) <-chan json.RawMessage + type ConsumedMessage struct + Event string + From string + Message json.RawMessage + MsgID string + type Handler func(payload json.RawMessage) + type PendingAuthRequest struct + ClientID string + ClientName string + CreatedAt string + DecisionReason string + Realm string + RequestID string + Role string + Status string + type ProduceReq struct + Broadcast string + Event string + From string + Group string + Guaranteed bool + Message interface{} + Method string + TTL interface{} + type RegisterConsumer struct + ConsumerID string + ID string + Name string + type RegisterProducer struct + Name string + type RetryPolicy struct + Backoff string + Delay string + MaxAttempts int + type ServerError struct + Code int + Message string + type SubscribeReq struct + Ack bool + AckTimeout string + Consumer string + ConsumerID string + Durable bool + Event string + Group string + ManualAck bool + Mode string + Producer string + Retry *RetryPolicy + Scope string