client

package
v0.0.0-...-c02b23a Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 8 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 interface {
	Ping() (*dispatcher.PingReply, error)
	Put(ctx context.Context, msg *transport.Message) (*transport.Message, error)

	Close() error
}

Client is the client for DNC

func NewGRPC

func NewGRPC(addr string) (Client, error)

New creates a new Client

func NewNATS

func NewNATS(addr string) (Client, error)

Creates a new NATS client.

type GRPCClient

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

GRPCClient Calls the client.

func (*GRPCClient) Close

func (s *GRPCClient) Close() error

func (*GRPCClient) Ping

func (c *GRPCClient) Ping() (*dispatcher.PingReply, error)

Ping sends a ping request..

func (*GRPCClient) Put

type NATSClient

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

func (*NATSClient) Close

func (client *NATSClient) Close() error

func (*NATSClient) Ping

func (client *NATSClient) Ping() (*dispatcher.PingReply, error)

func (*NATSClient) Put

func (client *NATSClient) Put(ctx context.Context, message *transport.Message) (*transport.Message, error)

When a plugin calls this method, the client sends a request over NATS and waits for a reply from the subscriber

Jump to

Keyboard shortcuts

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