Versions in this module Expand all Collapse all v1 v1.0.2 Sep 27, 2023 v1.0.1 May 23, 2023 Changes in this version + var DefaultAddress = ":19000" + var DefaultID = guuid.New().String() + var DefaultName = "go-server" + var DefaultVersion = "1.0.0" + type BindFuc func(*grpc.Server) + type Message interface + ContentType func() string + Payload func() interface{} + Topic func() string + type NewRPCServer func() (RPCServerI, error) + type Option func(*Options) + func Address(a string) Option + func ID(id string) Option + func Metadata(md map[string]string) Option + func Name(n string) Option + func Port(a int) Option + func RPCBind(fnc func(*grpc.Server)) Option + func RegisterInterval(t time.Duration) Option + func RegisterTTL(t time.Duration) Option + func Registry(r reg.Registry) Option + func RegistryEnable(status bool) Option + func Version(v string) Option + func Wait(b bool) Option + type Options struct + Address string + Context context.Context + ID string + Metadata map[string]string + Name string + Port int + RPCBind func(*grpc.Server) + RegisterInterval time.Duration + RegisterTTL time.Duration + Registry reg.Registry + RegistryEnable bool + Version string + type RPCClient interface + Call func(ctx context.Context, _func string, params ...interface{}) (interface{}, string) + CallArgs func(ctx context.Context, _func string, ArgsType []string, args [][]byte) (interface{}, string) + type RPCServer struct + Server *grpc.Server + ServerCert string + ServerKey string + func (R *RPCServer) Done() (err error) + func (R *RPCServer) GetRpc() *grpc.Server + func (R *RPCServer) SetRpc(sv *grpc.Server) + type RPCServerI interface + Done func() (err error) + GetRpc func() *grpc.Server + SetRpc func(sv *grpc.Server) + type Request interface + ContentType func() string + Method func() string + Request func() interface{} + Service func() string + Stream func() bool + type Server interface + GetRpcServer func() *grpc.Server + ID func() string + Init func(...Option) error + OnDestroy func() error + OnInit func(*glog.Logger) error + Options func() Options + Port func() int + Register func(f func(s *grpc.Server)) + ServiceDeregister func() error + ServiceRegister func() error + Start func(bind BindFuc, tracing bool) error + Stop func() error + String func() string + func NewServer(opt ...Option) Server + type Stream interface + Close func() error + Context func() context.Context + Error func() error + Recv func(interface{}) error + Request func() Request + Send func(interface{}) error