rpc

package
v0.0.0-...-c266f6d Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAgentClient

func NewAgentClient(addr string) (pb.AgentClient, error)

func NewCommanderClient

func NewCommanderClient(addr string) (pb.CommanderClient, error)

Types

type RpcClient

type RpcClient struct {
	Conn   *grpc.ClientConn
	Client *pb.AgentClient
}

type RpcPool

type RpcPool struct {
	Clients map[string]*RpcClient
	Lock    sync.RWMutex
}

func (*RpcPool) Get

func (r *RpcPool) Get(addr string) (*RpcClient, error)

func (*RpcPool) Release

func (r *RpcPool) Release(addr string) bool

func (*RpcPool) Set

func (r *RpcPool) Set(addr string) (*RpcClient, error)

Jump to

Keyboard shortcuts

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