client

package
v0.0.0-...-4ef9267 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(conn grpc.ClientConnInterface) *Client

func (*Client) Topic

func (c *Client) Topic(topic string) *Topic

type Subscribe

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

func NewSubscribe

func NewSubscribe(driver string, config interface{}) (*Subscribe, error)

func (*Subscribe) Run

func (s *Subscribe) Run(opt *SubscribeOptions) func()

type SubscribeOptions

type SubscribeOptions struct {
	Topic      string
	Queue      string
	OnMessage  func(id string, body []byte) error
	OnError    func(err error)
	OnWaitting func()
}

type Topic

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

func (*Topic) QueueCreate

func (t *Topic) QueueCreate(c context.Context, queue string) error

func (*Topic) QueueRemove

func (t *Topic) QueueRemove(c context.Context, queue string) error

func (*Topic) Send

func (t *Topic) Send(c context.Context, body string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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