client

package module
v0.0.0-...-f547c8a Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	NewClient(addr string)
	Query(name string)
	Publish(name string, value []byte)
	Consume(name string)
}

Client Generic interface of message pattern client.

type YamqClient

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

ClientRpc This struct contain RPC call data structure include connection

func NewClient

func NewClient(addr string) *YamqClient

NewClient Init related RPC call and dial to server by address<addr>

func (*YamqClient) Consume

func (c *YamqClient) Consume(name string)

Consume Consume data from Queue until now, if there still not get any info return empty result

func (*YamqClient) Publish

func (c *YamqClient) Publish(name string, value []byte)

Publish Publish data to the Queue

func (*YamqClient) Query

func (c *YamqClient) Query(name string)

Query Query Queue, will create new queue if it does not exist

func (*YamqClient) Subscribe

func (c *YamqClient) Subscribe(name string)

Subscribe Subscribes to a Queue

Jump to

Keyboard shortcuts

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