Documentation
¶
Index ¶
- type Namespace
- func (ns *Namespace) Context() context.Context
- func (ns *Namespace) Disconnect()
- func (ns *Namespace) GetPublisher(name string, ctx context.Context) (string, error)
- func (ns *Namespace) GetService(name string, ctx context.Context) (string, error)
- func (ns *Namespace) Logger() *slog.Logger
- func (ns *Namespace) Name() string
- type Publisher
- type Registry
- type Service
- type ServiceCaller
- type Subscriber
- type ThreadedService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
func JointNamespace ¶
func (*Namespace) Disconnect ¶
func (ns *Namespace) Disconnect()
func (*Namespace) GetPublisher ¶
func (*Namespace) GetService ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
type Service ¶
func NewService ¶
type ServiceCaller ¶
func NewServiceCaller ¶
func (*ServiceCaller[K, V]) Call ¶
func (sc *ServiceCaller[K, V]) Call(key K, ctx context.Context) (V, error)
Call sends key to the service and returns V from service context is used for establishing connection
func (*ServiceCaller[K, V]) Close ¶
func (sc *ServiceCaller[K, V]) Close()
type Subscriber ¶
type Subscriber[K any] struct { // contains filtered or unexported fields }
func NewSubscriber ¶
func NewSubscriber[K any](namespace *Namespace, topic string) (*Subscriber[K], error)
func (*Subscriber[K]) Get ¶
func (s *Subscriber[K]) Get() (K, error)
func (*Subscriber[K]) Stop ¶
func (s *Subscriber[K]) Stop()
func (*Subscriber[K]) SubscribedTo ¶
func (s *Subscriber[K]) SubscribedTo() string
type ThreadedService ¶
func NewThreadedService ¶
func (*ThreadedService[K, V]) Close ¶
func (ts *ThreadedService[K, V]) Close()
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
publisher
command
|
|
|
service
command
|
|
|
service_caller
command
|
|
|
subscriber
command
|
|
|
internal
|
|
Click to show internal directories.
Click to hide internal directories.