roc

module
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0

README ΒΆ

Roc

logo

GitHub Workflow Status Go Report Card Go Reference GitHub GitHub release (latest SemVer including pre-releases)

πŸ‘‹ Roc is a rpc micro framework,it designed with go,and transport protocol by rsocket-go.


IT IS UNDER ACTIVE DEVELOPMENT, APIs are unstable and maybe change at any time until release of v1.0.0.

πŸ‘€ Features
  • Simple to use ✨
  • Lightweight ✨
  • High performance ✨
  • Service discovery ✨
  • Support websocket and socket same time ✨
  • Support json or gogo proto when use rpc ✨
🌱 Quick start
  • first you must install proto and etcd

  • install protoc-gen-roc

    go get github.com/go-roc/roc/cmd/protoc-gen-roc
    protoc --roc_out = plugins = roc:.*.proto
  • run a roc server
    var s = server.NewRocServer(server.Namespace("srv.hello"))
    pbhello.RegisterHelloWorldServer(s, &Hello{})
    err := s.Run()
  • client rpc to server
    var opt = client.WithScope("srv.hello")
    var client = pbhello.NewHelloWorldClient(client.NewRocClient())
    rsp, err := h.client.Say(context.Background(), &pbhello.SayReq{Inc: 1}, h.opt)
πŸ’žοΈ see more example for more help.
πŸ“« How to reach me by email ...
  1743299@qq.com

code

✨ TODO ✨
  • bench test
  • sidecar
  • more example
  • more singleton tests
  • generate dir
  • command for request service
  • sidecar service
  • config service
  • broker redirect request service
  • logger service
  • simple service GUI

Directories ΒΆ

Path Synopsis
_auxiliary
cmd
roctl/project
enable project default generator
enable project default generator
internal
sig
x
metadata
Package metadata for websocket or socket from rsocket-rpc-go Metadata
Package metadata for websocket or socket from rsocket-rpc-go Metadata
log

Jump to

Keyboard shortcuts

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