rpc

package
v0.0.0-...-82ad568 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

README

openGauss grpc Server

Support API

// get openGauss master and worker replication stats
Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
// scale master and worker replicas
Scale(ctx context.Context, req *pb.ScaleRequest) (*pb.ScaleResponse, error)

Develop

protobuf documentation

# generate protobuf code
protoc --go_out=. --go_opt=paths=source_relative     --go-grpc_out=. --go-grpc_opt=paths=source_relative protobuf/clients.proto 

Usage

see rpc/rpcClient_test.go func TestRpcClient

Testing

First run rpc server

go test -run TestRpcServer -kubeconfig=$HOME/.kube/config -timeout 30s

Then run rpcClient test

go test -run TestRpcClient

Then you will see outputs like

2021/09/04 00:07:44 success:true
PASS
ok      github.com/waterme7on/openGauss-operator/rpc  0.056s

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRpcServer

func NewRpcServer(openGaussClientset clientset.Interface) *openGaussRpcServer

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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