natsjetstream

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JetStream

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

func NewJetStream

func NewJetStream(nc *nats.Conn) *JetStream

func (*JetStream) AddStream

func (this_ *JetStream) AddStream(name string, desc string, maxBytes int64) *berror.ErrMsg

func (*JetStream) AddStreamIfNoExist

func (this_ *JetStream) AddStreamIfNoExist(name string, desc string, maxBytes int64) *berror.ErrMsg

func (*JetStream) Close

func (this_ *JetStream) Close()

func (*JetStream) ConsumerInfo

func (this_ *JetStream) ConsumerInfo(stream string, name string) (*nats.ConsumerInfo, *berror.ErrMsg)

func (*JetStream) DeleteConsumer

func (this_ *JetStream) DeleteConsumer(stream string, name string) *berror.ErrMsg

func (*JetStream) DeleteStreamIfExist

func (this_ *JetStream) DeleteStreamIfExist(name string) *berror.ErrMsg

func (*JetStream) JetStream

func (this_ *JetStream) JetStream() nats.JetStream

func (*JetStream) Publish

func (this_ *JetStream) Publish(subj string, data []byte) *berror.ErrMsg

func (*JetStream) PullWithAll

func (this_ *JetStream) PullWithAll(stream string, name string) (*Puller, *berror.ErrMsg)

PullWithAll Pull all data

func (*JetStream) PullWithNewest

func (this_ *JetStream) PullWithNewest(stream string, name string) (*Puller, *berror.ErrMsg)

PullWithNewest Pull the latest data

func (*JetStream) PullWithSeq

func (this_ *JetStream) PullWithSeq(stream string, name string, seq uint64) (*Puller, *berror.ErrMsg)

PullWithSeq Start pulling data from the specified Sequence

func (*JetStream) PullWithTime

func (this_ *JetStream) PullWithTime(stream string, name string, time time.Time) (*Puller, *berror.ErrMsg)

PullWithTime Start pulling data from the specified time

func (*JetStream) UpdateConsumer

func (this_ *JetStream) UpdateConsumer(stream string, name string, seq uint64) *berror.ErrMsg

type Puller

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

func (*Puller) Close

func (this_ *Puller) Close()

func (*Puller) Fetch

func (this_ *Puller) Fetch(max int, maxWait time.Duration) ([]*nats.Msg, *berror.ErrMsg)

Jump to

Keyboard shortcuts

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