Documentation ¶
Index ¶
- type KVOption
- type KVOptions
- type Option
- func SetAddress(address string) Option
- func SetAuthorizationToken(token string) Option
- func SetCodec(c codec.Codec) Option
- func SetContext(ctx context.Context) Option
- func SetMarshaler(msh codec.Marshaler) Option
- func SetNatsOptions(opts ...nats.Option) Option
- func SetPassword(password string) Option
- func SetStoreName(name string) Option
- func SetUsername(username string) Option
- func UseCodec() Option
- func UseMarshaler() Option
- type Options
- type PublisherOption
- func DisablePubStreaming() PublisherOption
- func SetPubContentType(ContentType string) PublisherOption
- func SetPubContext(ctx context.Context) PublisherOption
- func SetPubHeader(key, value string) PublisherOption
- func SetPubHeaders(headers map[string]string) PublisherOption
- func SetPubMsgVersion(version string) PublisherOption
- type PublisherOptions
- type SubscriptionOption
- func DisableSubStreaming() SubscriptionOption
- func SetExpectedMessageSpecVersion(version string) SubscriptionOption
- func SetSubContentType(contentType string) SubscriptionOption
- func SetSubContext(ctx context.Context) SubscriptionOption
- func SetSubMaxRedelivery(n int) SubscriptionOption
- func SetSubType(t SubscriptionType) SubscriptionOption
- type SubscriptionOptions
- func (s SubscriptionOptions) ContentType() string
- func (s SubscriptionOptions) Context() context.Context
- func (s SubscriptionOptions) ExpectedSpecVersion() string
- func (s SubscriptionOptions) IsStreamingDisabled() bool
- func (s SubscriptionOptions) MaxRedelivery() int
- func (s SubscriptionOptions) SubscriptionType() SubscriptionType
- type SubscriptionType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVOptions ¶
type KVOptions struct {
// contains filtered or unexported fields
}
func (*KVOptions) BucketName ¶
func (*KVOptions) Description ¶
type Option ¶
func SetAddress ¶
func SetAuthorizationToken ¶
func SetContext ¶
func SetMarshaler ¶
func SetNatsOptions ¶
func SetNatsOptions(opts ...nats.Option) Option
func SetPassword ¶
func SetStoreName ¶
func SetUsername ¶
func UseMarshaler ¶
func UseMarshaler() Option
type Options ¶
type Options struct { // Used to select codec ServiceName string Address string CertContent string AuthenticationToken string Username string Password string // contains filtered or unexported fields }
func (*Options) NatOptions ¶
func (o *Options) NatOptions() []nats.Option
type PublisherOption ¶
type PublisherOption func(o *PublisherOptions) error
func DisablePubStreaming ¶
func DisablePubStreaming() PublisherOption
func SetPubContentType ¶
func SetPubContentType(ContentType string) PublisherOption
func SetPubContext ¶
func SetPubContext(ctx context.Context) PublisherOption
func SetPubHeader ¶
func SetPubHeader(key, value string) PublisherOption
func SetPubHeaders ¶
func SetPubHeaders(headers map[string]string) PublisherOption
func SetPubMsgVersion ¶
func SetPubMsgVersion(version string) PublisherOption
type PublisherOptions ¶
type PublisherOptions struct {
// contains filtered or unexported fields
}
func DefaultPublisherOptions ¶
func DefaultPublisherOptions(opts ...PublisherOption) (*PublisherOptions, error)
func (*PublisherOptions) ContentType ¶
func (p *PublisherOptions) ContentType() string
func (*PublisherOptions) Context ¶
func (p *PublisherOptions) Context() context.Context
func (*PublisherOptions) Headers ¶
func (p *PublisherOptions) Headers() map[string]string
func (*PublisherOptions) IsStreamingDisabled ¶
func (p *PublisherOptions) IsStreamingDisabled() bool
func (*PublisherOptions) SpecVersion ¶
func (p *PublisherOptions) SpecVersion() string
type SubscriptionOption ¶
type SubscriptionOption func(o *SubscriptionOptions) error
func DisableSubStreaming ¶
func DisableSubStreaming() SubscriptionOption
func SetExpectedMessageSpecVersion ¶
func SetExpectedMessageSpecVersion(version string) SubscriptionOption
func SetSubContentType ¶
func SetSubContentType(contentType string) SubscriptionOption
func SetSubContext ¶
func SetSubContext(ctx context.Context) SubscriptionOption
func SetSubMaxRedelivery ¶
func SetSubMaxRedelivery(n int) SubscriptionOption
func SetSubType ¶
func SetSubType(t SubscriptionType) SubscriptionOption
type SubscriptionOptions ¶
type SubscriptionOptions struct {
// contains filtered or unexported fields
}
func DefaultSubOptions ¶
func DefaultSubOptions(opts ...SubscriptionOption) (*SubscriptionOptions, error)
func (SubscriptionOptions) ContentType ¶
func (s SubscriptionOptions) ContentType() string
func (SubscriptionOptions) Context ¶
func (s SubscriptionOptions) Context() context.Context
func (SubscriptionOptions) ExpectedSpecVersion ¶
func (s SubscriptionOptions) ExpectedSpecVersion() string
func (SubscriptionOptions) IsStreamingDisabled ¶
func (s SubscriptionOptions) IsStreamingDisabled() bool
func (SubscriptionOptions) MaxRedelivery ¶
func (s SubscriptionOptions) MaxRedelivery() int
func (SubscriptionOptions) SubscriptionType ¶
func (s SubscriptionOptions) SubscriptionType() SubscriptionType
type SubscriptionType ¶
type SubscriptionType int
SubscriptionType of subscription supported by most messaging systems. ( Pulsar,
const ( // Exclusive there can be only 1 consumer on the same topic with the same subscription name Exclusive SubscriptionType = iota // and the messages will be dispatched according to // a round-robin rotation between the connected consumers Shared // Failover subscription mode, multiple consumer will be able to use the same subscription name // but only 1 consumer will receive the messages. // If that consumer disconnects, one of the other connected consumers will start receiving messages. Failover // subscription and all messages with the same key will be dispatched to only one consumer KeyShared )
func (SubscriptionType) IsValid ¶
func (t SubscriptionType) IsValid() bool
func (SubscriptionType) String ¶
func (t SubscriptionType) String() string
Click to show internal directories.
Click to hide internal directories.