dynamic

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package dynamic implements a dynamic grpc client It requires the server to be registered to the grpc reflection Service

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
}

Client represents a client to a grpc service

func NewClient

func NewClient(target string, service string) (*Client, error)

NewClient creates a new Client given a target and a service name with defaults connection options

func NewClientWithDialOptions

func NewClientWithDialOptions(target string, service string, opts ...grpc.DialOption) (*Client, error)

NewClientWithDialOptions creates a new Client given a target and a service name using the grpc.DialOptions

func (*Client) Connect

func (c *Client) Connect(ctx context.Context) error

Connect connects the client to the service

func (*Client) Invoke

func (c *Client) Invoke(
	ctx context.Context,
	method string,
	input [][]byte,
	callOpts ...grpc.CallOption,
) ([]byte, error)

Invoke invokes a method in the service

Jump to

Keyboard shortcuts

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