rpc

package
v0.0.0-...-60d6fac Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func([]byte) ([]byte, error)

Handler defines method for handling of request

type Receive

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

func (*Receive) Close

func (srv *Receive) Close()

Close provides closing and shutdown of the server

func (*Receive) Serve

func (srv *Receive) Serve(ctx context.Context, f Handler)

Serve provides receiving of the messages

type Server

type Server interface {
	Close()
	Serve(context.Context, Handler)
}

Server defines interface for server

func New

func New(channel *amqp.Channel, queue string) (Server, error)

New creates a new receiver

Jump to

Keyboard shortcuts

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