worker

package
v0.0.2-0...-1b30d8d Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: MIT Imports: 8 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 struct {
	Cfg *ClientConfig
	// contains filtered or unexported fields
}

Client that listens for events from the Azure Functions host and executes Golang methods

func New

func New(cfg *ClientConfig) *Client

New returns a new instance of Client

func (*Client) Connect

func (client *Client) Connect(opts ...grpc.DialOption) (err error)

Connect tries to establish a grpc connection with the server

func (*Client) Disconnect

func (client *Client) Disconnect() error

Disconnect closes the connection to the server

func (*Client) StartEventStream

func (client *Client) StartEventStream(ctx context.Context, opts ...grpc.CallOption)

StartEventStream starts listening for messages from the Azure Functions Host

type ClientConfig

type ClientConfig struct {
	Host             string
	Port             int
	WorkerID         string
	RequestID        string
	MaxMessageLength int
}

ClientConfig contains all necessary configuration to connect to the Azure Functions Host

Jump to

Keyboard shortcuts

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