Versions in this module Expand all Collapse all v0 v0.5.0 Dec 11, 2022 v0.4.1 Jul 21, 2021 v0.4.0 Jul 2, 2021 v0.3.2 May 16, 2021 v0.3.1 Apr 18, 2021 v0.3.0 Feb 16, 2021 v0.2.3 Jan 16, 2021 v0.2.2 Dec 19, 2020 Changes in this version + func ErrInvalidArgument(name string, msg string) error + func GetOffsetN(page, pageSize uint) (offset, n uint) + func GetPage(reqPage, reqPageSize uint32) (page, pageSize uint) type Admin + func (a *Admin) OnSessionResumedWrapper(pre server.OnSessionResumed) server.OnSessionResumed + type GRPCGatewayRegister interface + type GRPCRegister interface + RegisterGRPC func(s grpc.ServiceRegistrar) + type HTTPRegister interface + RegisterHTTP func(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error) + type Indexer struct + func NewIndexer() *Indexer + func (i *Indexer) GetByID(id string) *list.Element + func (i *Indexer) Iterate(fn func(elem *list.Element), offset, n uint) + func (i *Indexer) Len() int + func (i *Indexer) Remove(id string) *list.Element + func (i *Indexer) Set(id string, value interface{}) v0.2.1 Dec 15, 2020 v0.2.0 Dec 14, 2020 Changes in this version + const Name + var DefaultConfig = Config + var ErrNotFound = errors.New("not found") + var File_client_proto protoreflect.FileDescriptor + var File_publish_proto protoreflect.FileDescriptor + var File_subscription_proto protoreflect.FileDescriptor + var SubFilterType_name = map[int32]string + var SubFilterType_value = map[string]int32 + var SubMatchType_name = map[int32]string + var SubMatchType_value = map[string]int32 + func InvalidArgument(name string, msg string) error + func New(ctx context.Context, config config.Config) (server.Plugable, error) + func RegisterClientServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error + func RegisterClientServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClientServiceClient) error + func RegisterClientServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error) + func RegisterClientServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClientServiceServer) error + func RegisterClientServiceServer(s grpc.ServiceRegistrar, srv ClientServiceServer) + func RegisterPublishServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error + func RegisterPublishServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PublishServiceClient) error + func RegisterPublishServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error) + func RegisterPublishServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PublishServiceServer) error + func RegisterPublishServiceServer(s grpc.ServiceRegistrar, srv PublishServiceServer) + func RegisterSubscriptionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error + func RegisterSubscriptionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SubscriptionServiceClient) error + func RegisterSubscriptionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error) + func RegisterSubscriptionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SubscriptionServiceServer) error + func RegisterSubscriptionServiceServer(s grpc.ServiceRegistrar, srv SubscriptionServiceServer) + type Admin struct + func (a *Admin) HookWrapper() server.HookWrapper + func (a *Admin) Load(service server.Server) (err error) + func (a *Admin) Name() string + func (a *Admin) OnClosedWrapper(pre server.OnClosed) server.OnClosed + func (a *Admin) OnSessionCreatedWrapper(pre server.OnSessionCreated) server.OnSessionCreated + func (a *Admin) OnSessionResumeWrapper(pre server.OnSessionResumed) server.OnSessionResumed + func (a *Admin) OnSessionTerminatedWrapper(pre server.OnSessionTerminated) server.OnSessionTerminated + func (a *Admin) OnSubscribedWrapper(pre server.OnSubscribed) server.OnSubscribed + func (a *Admin) OnUnsubscribedWrapper(pre server.OnUnsubscribed) server.OnUnsubscribed + func (a *Admin) Unload() error + type Client struct + ClientId string + ConnectedAt *timestamp.Timestamp + DisconnectedAt *timestamp.Timestamp + InflightLen uint32 + KeepAlive int32 + LocalAddr string + MaxInflight uint32 + MaxQueue uint32 + MessageDropped uint64 + PacketsReceivedBytes uint64 + PacketsReceivedNums uint64 + PacketsSendBytes uint64 + PacketsSendNums uint64 + QueueLen uint32 + RemoteAddr string + SessionExpiry uint32 + SubscriptionsCurrent uint32 + SubscriptionsTotal uint32 + Username string + Version int32 + func (*Client) Descriptor() ([]byte, []int) + func (*Client) ProtoMessage() + func (x *Client) GetClientId() string + func (x *Client) GetConnectedAt() *timestamp.Timestamp + func (x *Client) GetDisconnectedAt() *timestamp.Timestamp + func (x *Client) GetInflightLen() uint32 + func (x *Client) GetKeepAlive() int32 + func (x *Client) GetLocalAddr() string + func (x *Client) GetMaxInflight() uint32 + func (x *Client) GetMaxQueue() uint32 + func (x *Client) GetMessageDropped() uint64 + func (x *Client) GetPacketsReceivedBytes() uint64 + func (x *Client) GetPacketsReceivedNums() uint64 + func (x *Client) GetPacketsSendBytes() uint64 + func (x *Client) GetPacketsSendNums() uint64 + func (x *Client) GetQueueLen() uint32 + func (x *Client) GetRemoteAddr() string + func (x *Client) GetSessionExpiry() uint32 + func (x *Client) GetSubscriptionsCurrent() uint32 + func (x *Client) GetSubscriptionsTotal() uint32 + func (x *Client) GetUsername() string + func (x *Client) GetVersion() int32 + func (x *Client) ProtoReflect() protoreflect.Message + func (x *Client) Reset() + func (x *Client) String() string + type ClientServiceClient interface + Delete func(ctx context.Context, in *DeleteClientRequest, opts ...grpc.CallOption) (*empty.Empty, error) + Get func(ctx context.Context, in *GetClientRequest, opts ...grpc.CallOption) (*GetClientResponse, error) + List func(ctx context.Context, in *ListClientRequest, opts ...grpc.CallOption) (*ListClientResponse, error) + func NewClientServiceClient(cc grpc.ClientConnInterface) ClientServiceClient + type ClientServiceServer interface + Delete func(context.Context, *DeleteClientRequest) (*empty.Empty, error) + Get func(context.Context, *GetClientRequest) (*GetClientResponse, error) + List func(context.Context, *ListClientRequest) (*ListClientResponse, error) + type Config struct + GRPC GRPCConfig + HTTP HTTPConfig + func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error + func (c *Config) Validate() error + type DeleteClientRequest struct + CleanSession bool + ClientId string + func (*DeleteClientRequest) Descriptor() ([]byte, []int) + func (*DeleteClientRequest) ProtoMessage() + func (x *DeleteClientRequest) GetCleanSession() bool + func (x *DeleteClientRequest) GetClientId() string + func (x *DeleteClientRequest) ProtoReflect() protoreflect.Message + func (x *DeleteClientRequest) Reset() + func (x *DeleteClientRequest) String() string + type FilterSubscriptionRequest struct + ClientId string + FilterType string + Limit int32 + MatchType SubMatchType + TopicName string + func (*FilterSubscriptionRequest) Descriptor() ([]byte, []int) + func (*FilterSubscriptionRequest) ProtoMessage() + func (x *FilterSubscriptionRequest) GetClientId() string + func (x *FilterSubscriptionRequest) GetFilterType() string + func (x *FilterSubscriptionRequest) GetLimit() int32 + func (x *FilterSubscriptionRequest) GetMatchType() SubMatchType + func (x *FilterSubscriptionRequest) GetTopicName() string + func (x *FilterSubscriptionRequest) ProtoReflect() protoreflect.Message + func (x *FilterSubscriptionRequest) Reset() + func (x *FilterSubscriptionRequest) String() string + type FilterSubscriptionResponse struct + Subscriptions []*Subscription + func (*FilterSubscriptionResponse) Descriptor() ([]byte, []int) + func (*FilterSubscriptionResponse) ProtoMessage() + func (x *FilterSubscriptionResponse) GetSubscriptions() []*Subscription + func (x *FilterSubscriptionResponse) ProtoReflect() protoreflect.Message + func (x *FilterSubscriptionResponse) Reset() + func (x *FilterSubscriptionResponse) String() string + type GRPCConfig struct + Addr string + type GetClientRequest struct + ClientId string + func (*GetClientRequest) Descriptor() ([]byte, []int) + func (*GetClientRequest) ProtoMessage() + func (x *GetClientRequest) GetClientId() string + func (x *GetClientRequest) ProtoReflect() protoreflect.Message + func (x *GetClientRequest) Reset() + func (x *GetClientRequest) String() string + type GetClientResponse struct + Client *Client + func (*GetClientResponse) Descriptor() ([]byte, []int) + func (*GetClientResponse) ProtoMessage() + func (x *GetClientResponse) GetClient() *Client + func (x *GetClientResponse) ProtoReflect() protoreflect.Message + func (x *GetClientResponse) Reset() + func (x *GetClientResponse) String() string + type HTTPConfig struct + Addr string + Enable bool + type ListClientRequest struct + Page uint32 + PageSize uint32 + func (*ListClientRequest) Descriptor() ([]byte, []int) + func (*ListClientRequest) ProtoMessage() + func (x *ListClientRequest) GetPage() uint32 + func (x *ListClientRequest) GetPageSize() uint32 + func (x *ListClientRequest) ProtoReflect() protoreflect.Message + func (x *ListClientRequest) Reset() + func (x *ListClientRequest) String() string + type ListClientResponse struct + Clients []*Client + TotalCount uint32 + func (*ListClientResponse) Descriptor() ([]byte, []int) + func (*ListClientResponse) ProtoMessage() + func (x *ListClientResponse) GetClients() []*Client + func (x *ListClientResponse) GetTotalCount() uint32 + func (x *ListClientResponse) ProtoReflect() protoreflect.Message + func (x *ListClientResponse) Reset() + func (x *ListClientResponse) String() string + type ListSubscriptionRequest struct + Page uint32 + PageSize uint32 + func (*ListSubscriptionRequest) Descriptor() ([]byte, []int) + func (*ListSubscriptionRequest) ProtoMessage() + func (x *ListSubscriptionRequest) GetPage() uint32 + func (x *ListSubscriptionRequest) GetPageSize() uint32 + func (x *ListSubscriptionRequest) ProtoReflect() protoreflect.Message + func (x *ListSubscriptionRequest) Reset() + func (x *ListSubscriptionRequest) String() string + type ListSubscriptionResponse struct + Subscriptions []*Subscription + TotalCount uint32 + func (*ListSubscriptionResponse) Descriptor() ([]byte, []int) + func (*ListSubscriptionResponse) ProtoMessage() + func (x *ListSubscriptionResponse) GetSubscriptions() []*Subscription + func (x *ListSubscriptionResponse) GetTotalCount() uint32 + func (x *ListSubscriptionResponse) ProtoReflect() protoreflect.Message + func (x *ListSubscriptionResponse) Reset() + func (x *ListSubscriptionResponse) String() string + type PublishRequest struct + ContentType string + CorrelationData string + MessageExpiry uint32 + Payload string + PayloadFormat uint32 + Qos uint32 + ResponseTopic string + Retained bool + TopicName string + UserProperties []*UserProperties + func (*PublishRequest) Descriptor() ([]byte, []int) + func (*PublishRequest) ProtoMessage() + func (x *PublishRequest) GetContentType() string + func (x *PublishRequest) GetCorrelationData() string + func (x *PublishRequest) GetMessageExpiry() uint32 + func (x *PublishRequest) GetPayload() string + func (x *PublishRequest) GetPayloadFormat() uint32 + func (x *PublishRequest) GetQos() uint32 + func (x *PublishRequest) GetResponseTopic() string + func (x *PublishRequest) GetRetained() bool + func (x *PublishRequest) GetTopicName() string + func (x *PublishRequest) GetUserProperties() []*UserProperties + func (x *PublishRequest) ProtoReflect() protoreflect.Message + func (x *PublishRequest) Reset() + func (x *PublishRequest) String() string + type PublishServiceClient interface + Publish func(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*empty.Empty, error) + func NewPublishServiceClient(cc grpc.ClientConnInterface) PublishServiceClient + type PublishServiceServer interface + Publish func(context.Context, *PublishRequest) (*empty.Empty, error) + type SubFilterType int32 + const SubFilterType_SUB_FILTER_TYPE_NON_SHARED + const SubFilterType_SUB_FILTER_TYPE_SHARED + const SubFilterType_SUB_FILTER_TYPE_SYS + const SubFilterType_SUB_FILTER_TYPE_SYS_UNSPECIFIED + func (SubFilterType) Descriptor() protoreflect.EnumDescriptor + func (SubFilterType) EnumDescriptor() ([]byte, []int) + func (SubFilterType) Type() protoreflect.EnumType + func (x SubFilterType) Enum() *SubFilterType + func (x SubFilterType) Number() protoreflect.EnumNumber + func (x SubFilterType) String() string + type SubMatchType int32 + const SubMatchType_SUB_MATCH_TYPE_MATCH_FILTER + const SubMatchType_SUB_MATCH_TYPE_MATCH_NAME + const SubMatchType_SUB_MATCH_TYPE_MATCH_UNSPECIFIED + func (SubMatchType) Descriptor() protoreflect.EnumDescriptor + func (SubMatchType) EnumDescriptor() ([]byte, []int) + func (SubMatchType) Type() protoreflect.EnumType + func (x SubMatchType) Enum() *SubMatchType + func (x SubMatchType) Number() protoreflect.EnumNumber + func (x SubMatchType) String() string + type SubscribeRequest struct + ClientId string + Subscriptions []*Subscription + func (*SubscribeRequest) Descriptor() ([]byte, []int) + func (*SubscribeRequest) ProtoMessage() + func (x *SubscribeRequest) GetClientId() string + func (x *SubscribeRequest) GetSubscriptions() []*Subscription + func (x *SubscribeRequest) ProtoReflect() protoreflect.Message + func (x *SubscribeRequest) Reset() + func (x *SubscribeRequest) String() string + type SubscribeResponse struct + New []bool + func (*SubscribeResponse) Descriptor() ([]byte, []int) + func (*SubscribeResponse) ProtoMessage() + func (x *SubscribeResponse) GetNew() []bool + func (x *SubscribeResponse) ProtoReflect() protoreflect.Message + func (x *SubscribeResponse) Reset() + func (x *SubscribeResponse) String() string + type Subscription struct + ClientId string + Id uint32 + NoLocal bool + Qos uint32 + RetainAsPublished bool + RetainHandling uint32 + TopicName string + func (*Subscription) Descriptor() ([]byte, []int) + func (*Subscription) ProtoMessage() + func (x *Subscription) GetClientId() string + func (x *Subscription) GetId() uint32 + func (x *Subscription) GetNoLocal() bool + func (x *Subscription) GetQos() uint32 + func (x *Subscription) GetRetainAsPublished() bool + func (x *Subscription) GetRetainHandling() uint32 + func (x *Subscription) GetTopicName() string + func (x *Subscription) ProtoReflect() protoreflect.Message + func (x *Subscription) Reset() + func (x *Subscription) String() string + type SubscriptionServiceClient interface + Filter func(ctx context.Context, in *FilterSubscriptionRequest, opts ...grpc.CallOption) (*FilterSubscriptionResponse, error) + List func(ctx context.Context, in *ListSubscriptionRequest, opts ...grpc.CallOption) (*ListSubscriptionResponse, error) + Subscribe func(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) + Unsubscribe func(ctx context.Context, in *UnsubscribeRequest, opts ...grpc.CallOption) (*empty.Empty, error) + func NewSubscriptionServiceClient(cc grpc.ClientConnInterface) SubscriptionServiceClient + type SubscriptionServiceServer interface + Filter func(context.Context, *FilterSubscriptionRequest) (*FilterSubscriptionResponse, error) + List func(context.Context, *ListSubscriptionRequest) (*ListSubscriptionResponse, error) + Subscribe func(context.Context, *SubscribeRequest) (*SubscribeResponse, error) + Unsubscribe func(context.Context, *UnsubscribeRequest) (*empty.Empty, error) + type UnimplementedClientServiceServer struct + func (UnimplementedClientServiceServer) Delete(context.Context, *DeleteClientRequest) (*empty.Empty, error) + func (UnimplementedClientServiceServer) Get(context.Context, *GetClientRequest) (*GetClientResponse, error) + func (UnimplementedClientServiceServer) List(context.Context, *ListClientRequest) (*ListClientResponse, error) + type UnimplementedPublishServiceServer struct + func (UnimplementedPublishServiceServer) Publish(context.Context, *PublishRequest) (*empty.Empty, error) + type UnimplementedSubscriptionServiceServer struct + func (UnimplementedSubscriptionServiceServer) Filter(context.Context, *FilterSubscriptionRequest) (*FilterSubscriptionResponse, error) + func (UnimplementedSubscriptionServiceServer) List(context.Context, *ListSubscriptionRequest) (*ListSubscriptionResponse, error) + func (UnimplementedSubscriptionServiceServer) Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) + func (UnimplementedSubscriptionServiceServer) Unsubscribe(context.Context, *UnsubscribeRequest) (*empty.Empty, error) + type UnsafeClientServiceServer interface + type UnsafePublishServiceServer interface + type UnsafeSubscriptionServiceServer interface + type UnsubscribeRequest struct + ClientId string + Topics []string + func (*UnsubscribeRequest) Descriptor() ([]byte, []int) + func (*UnsubscribeRequest) ProtoMessage() + func (x *UnsubscribeRequest) GetClientId() string + func (x *UnsubscribeRequest) GetTopics() []string + func (x *UnsubscribeRequest) ProtoReflect() protoreflect.Message + func (x *UnsubscribeRequest) Reset() + func (x *UnsubscribeRequest) String() string + type UserProperties struct + K []byte + V []byte + func (*UserProperties) Descriptor() ([]byte, []int) + func (*UserProperties) ProtoMessage() + func (x *UserProperties) GetK() []byte + func (x *UserProperties) GetV() []byte + func (x *UserProperties) ProtoReflect() protoreflect.Message + func (x *UserProperties) Reset() + func (x *UserProperties) String() string