common

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLS

type CLS struct {
	SecretId  string `yaml:"secret_id"`
	SecretKey string `yaml:"secret_key"`
	Endpoint  string `yaml:"endpoint"`
	TopicId   string `yaml:"topic_id"`
}

type CLSReply

type CLSReply struct {
	*Inject

	Msg *nats.Msg
}

func (*CLSReply) Fail

func (x *CLSReply) Fail(result *cls.Result)

func (*CLSReply) Success

func (x *CLSReply) Success(result *cls.Result)

type Collertor

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

func NewCollertor

func NewCollertor() *Collertor

func (*Collertor) Get

func (x *Collertor) Get(k string) *nats.Subscription

func (*Collertor) Remove

func (x *Collertor) Remove(k string)

func (*Collertor) Set

func (x *Collertor) Set(k string, v *nats.Subscription)

func (*Collertor) Size

func (x *Collertor) Size() int

func (*Collertor) Value

func (x *Collertor) Value() map[string]*nats.Subscription

type Inject

type Inject struct {
	Values *Values
	Log    *zap.Logger
	Nats   *nats.Conn
	Js     nats.JetStreamContext
	CLS    *cls.AsyncProducerClient
}

type Nats

type Nats struct {
	Hosts []string `yaml:"hosts"`
	Nkey  string   `yaml:"nkey"`
}

type Values

type Values struct {
	Namespace string `yaml:"namespace"`
	Nats      Nats   `yaml:"nats"`
	CLS       CLS    `yaml:"cls"`
}

Jump to

Keyboard shortcuts

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