grpc

command
v0.0.0-...-d9c5257 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

CURD Resource/Bundle with gRPC Client

Preparation

  1. Enable gRPC server by passing --enable-grpc-server=true to the maestro server start command, for example:
$ oc -n maestro patch deploy/maestro --type=json -p='[{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--enable-grpc-server=true"}]'
  1. Port-forward the gRPC service to your local machine, for example:
$ oc -n maestro port-forward svc/maestro-grpc 8090 &

Operate Resource with gRPC client

# create
go run ./grpcclient.go -grpc_server localhost:8090 -cloudevents_json_file ./cloudevent.json

# update
go run ./grpcclient.go -grpc_server localhost:8090 -cloudevents_json_file ./cloudevent-update.json

# delete
go run ./grpcclient.go -grpc_server localhost:8090 -cloudevents_json_file ./cloudevent-delete.json

Operate Resource Bundle with gRPC client

# create
go run ./grpcclient.go -grpc_server localhost:8090 -cloudevents_json_file ./cloudevent-bundle.json

# update
go run ./grpcclient.go -grpc_server localhost:8090 -cloudevents_json_file ./cloudevent-bundle-update.json

# delete
go run ./grpcclient.go -grpc_server localhost:8090 -cloudevents_json_file ./cloudevent-bundle-delete.json

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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