Documentation ¶
Index ¶
- Variables
- func ToConsumerQueueName(pfx, topic string) string
- func ToConsumerSubjects(topic string) []string
- func ToPublisherSubject(topic string) string
- func ToPublisherSubjectWithTarget(topic string, target config.MachineID) string
- func ToTopic(subject string) (topic string, dest config.MachineID)
- type Client
- func (r *Client) Consumer(ctx context.Context, stream string, cfg jetstream.ConsumerConfig) (c jetstream.Consumer, err error)
- func (r *Client) KVStore(ctx context.Context, cfg jetstream.KeyValueConfig) (kv jetstream.KeyValue, err error)
- func (r *Client) Stream(ctx context.Context, cfg jetstream.StreamConfig) (str jetstream.Stream, err error)
- type Gateway
Constants ¶
This section is empty.
Variables ¶
View Source
var AnyCastMachineID = config.MachineID(0)
Functions ¶
func ToConsumerQueueName ¶
func ToConsumerSubjects ¶
Given a user-specified topic, return the subject names to use for NATS consumers.
func ToPublisherSubject ¶
Given a user-specified topic, return the subject name to use for NATS publishers.
Types ¶
type Client ¶
type Gateway ¶
type Gateway struct { *Client Server *autonats.Server // Internal resources PeerKV, SchedulerKV jetstream.KeyValue // Global resources for the user DefaultKV, DailyKV, WeeklyKV, MonthlyKV jetstream.KeyValue EventStream jetstream.Stream // contains filtered or unexported fields }
func (*Gateway) DefaultKVStore ¶
Gets the KV store for the default kv usage given the key.
Click to show internal directories.
Click to hide internal directories.