jetstream

package
v0.0.0-...-0ebfa01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_stream_message_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

func NewStream

func NewStream(streamName string, js nats.JetStreamContext, logger zerolog.Logger) *Stream

func (*Stream) Publish

func (s *Stream) Publish(ctx context.Context, topicName string, rawMsg am.RawMessage) (err error)

func (*Stream) Subscribe

func (s *Stream) Subscribe(topicName string, handler am.RawMessageHandler, options ...am.SubscriberOption) (am.Subscription, error)

func (*Stream) Unsubscribe

func (s *Stream) Unsubscribe() error

type StreamMessage

type StreamMessage struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamMessage) Descriptor deprecated

func (*StreamMessage) Descriptor() ([]byte, []int)

Deprecated: Use StreamMessage.ProtoReflect.Descriptor instead.

func (*StreamMessage) GetData

func (x *StreamMessage) GetData() []byte

func (*StreamMessage) GetId

func (x *StreamMessage) GetId() string

func (*StreamMessage) GetName

func (x *StreamMessage) GetName() string

func (*StreamMessage) ProtoMessage

func (*StreamMessage) ProtoMessage()

func (*StreamMessage) ProtoReflect

func (x *StreamMessage) ProtoReflect() protoreflect.Message

func (*StreamMessage) Reset

func (x *StreamMessage) Reset()

func (*StreamMessage) String

func (x *StreamMessage) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL