grpc

package
v0.0.0-...-e47cf43 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadBufSize  = 10 << 20
	WriteBufSize = 10 << 20
	Timeout      = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NexusClient

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

func NewInSecureNexusClient

func NewInSecureNexusClient(svcAddr string) (*NexusClient, error)

func (*NexusClient) AddNode

func (this *NexusClient) AddNode(nodeUrl string) error

func (*NexusClient) Close

func (this *NexusClient) Close() error

func (*NexusClient) HealthCheck

func (*NexusClient) ListNodes

func (this *NexusClient) ListNodes() (uint64, map[uint64]*models.NodeInfo)

func (*NexusClient) Load

func (this *NexusClient) Load(data []byte, params map[string][]byte) ([]byte, error)

func (*NexusClient) RemoveNode

func (this *NexusClient) RemoveNode(nodeUrl string) error

func (*NexusClient) Save

func (this *NexusClient) Save(data []byte, params map[string][]byte) ([]byte, error)

type NexusService

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

func NewNexusService

func NewNexusService(port uint, repl api.RaftReplicator) *NexusService

func (*NexusService) AddNode

func (this *NexusService) AddNode(ctx context.Context, req *api.AddNodeRequest) (*api.Status, error)

func (*NexusService) Check

func (*NexusService) Close

func (this *NexusService) Close() error

func (*NexusService) ListNodes

func (this *NexusService) ListNodes(ctx context.Context, _ *empty.Empty) (*api.ListNodesResponse, error)

func (*NexusService) ListenAndServe

func (this *NexusService) ListenAndServe()

func (*NexusService) Load

func (this *NexusService) Load(ctx context.Context, req *api.LoadRequest) (*api.LoadResponse, error)

func (*NexusService) NewGRPCServer

func (this *NexusService) NewGRPCServer() *ggrpc.Server

func (*NexusService) NewListener

func (this *NexusService) NewListener() net.Listener

func (*NexusService) RemoveNode

func (this *NexusService) RemoveNode(ctx context.Context, req *api.RemoveNodeRequest) (*api.Status, error)

func (*NexusService) Save

func (this *NexusService) Save(ctx context.Context, req *api.SaveRequest) (*api.SaveResponse, error)

Jump to

Keyboard shortcuts

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