Documentation ΒΆ
Index ΒΆ
- Constants
- Variables
- type Conn
- type Invoke
- type InvokeOption
- type InvokeOptions
- type Option
- type Options
- func BuffSize(buffSize int) Options
- func Codec(cc codec.Codec) Options
- func ConfigOption(opts ...config.Options) Options
- func ConnectTimeout(connectTimeout time.Duration) Options
- func E(e *endpoint.Endpoint) Options
- func Error(err parcel.ErrorPackager) Options
- func EtcdConfig(e *clientv3.Config) Options
- func Exit(exit ...func()) Options
- func Id(id string) Options
- func KeepaliveInterval(keepaliveInterval time.Duration) Options
- func KeepaliveLifetime(keepaliveLifetime time.Duration) Options
- func Namespace(name string) Options
- func Port(port [2]int) Options
- func Signal(signal ...os.Signal) Options
- func TCPAddress(address string) Options
- func Version(version string) Options
- func Wrapper(wrappers ...parcel.Wrapper) Options
- func WssAddress(address, path string) Options
- type Service
- func (s *Service) Close()
- func (s *Service) Codec() codec.Codec
- func (s *Service) InvokeRC(c *context.Context, method string, req chan []byte, errIn chan error, ...) (chan []byte, chan error)
- func (s *Service) InvokeRR(c *context.Context, method string, req, rsp proto.Message, ...) error
- func (s *Service) InvokeRS(c *context.Context, method string, req proto.Message, opts ...InvokeOptions) (chan []byte, chan error)
- func (s *Service) RegisterChannelHandler(method string, rs parcel.ChannelHandler)
- func (s *Service) RegisterHandler(method string, rr parcel.Handler)
- func (s *Service) RegisterStreamHandler(method string, rs parcel.StreamHandler)
- func (s *Service) Run() error
- type Strategy
Constants ΒΆ
View Source
const ( // StateBlock block is unavailable state StateBlock state = 0x01 + iota // StateReady ready is unavailable state StateReady // StateWorking is available state StateWorking )
View Source
const SupportPackageIsVersion1 = 1
Variables ΒΆ
View Source
var ( ErrorNoneServer = errors.New("server is none to use") ErrorNoSuchServer = errors.New("no such server") )
Functions ΒΆ
This section is empty.
Types ΒΆ
type InvokeOption ΒΆ
type InvokeOption struct {
// contains filtered or unexported fields
}
type InvokeOptions ΒΆ
type InvokeOptions func(*InvokeOption)
func InvokeBuffSize ΒΆ
func InvokeBuffSize(buffSize int) InvokeOptions
InvokeBuffSize set buff size for requestChannel
func WithAddress ΒΆ
func WithAddress(name, address string, version ...string) InvokeOptions
WithAddress set service discover prefix with both service serviceName and address
func WithName ΒΆ
func WithName(name string, version ...string) InvokeOptions
WithName set service discover prefix with service serviceName
type Options ΒΆ
type Options func(option *Option)
func ConfigOption ΒΆ
func ConnectTimeout ΒΆ
ConnectTimeout set connect timeout
func Error ΒΆ
func Error(err parcel.ErrorPackager) Options
func EtcdConfig ΒΆ
EtcdConfig setting global etcd config first
func KeepaliveInterval ΒΆ
KeepaliveInterval set keepalive interval
func KeepaliveLifetime ΒΆ
KeepaliveLifetime set keepalive life time
func TCPAddress ΒΆ
func WssAddress ΒΆ
type Service ΒΆ
type Service struct {
// contains filtered or unexported fields
}
func NewService ΒΆ
func (*Service) InvokeRC ΒΆ
func (s *Service) InvokeRC( c *context.Context, method string, req chan []byte, errIn chan error, opts ...InvokeOptions, ) (chan []byte, chan error)
InvokeRC rpc request requestChannel,it's multiple request and multiple response
func (*Service) InvokeRR ΒΆ
func (s *Service) InvokeRR(c *context.Context, method string, req, rsp proto.Message, opts ...InvokeOptions) error
InvokeRR rpc request requestResponse,it's block request,one request one response
func (*Service) InvokeRS ΒΆ
func (s *Service) InvokeRS(c *context.Context, method string, req proto.Message, opts ...InvokeOptions) ( chan []byte, chan error, )
InvokeRS rpc request requestStream,it's one request and multiple response
func (*Service) RegisterChannelHandler ΒΆ
func (s *Service) RegisterChannelHandler(method string, rs parcel.ChannelHandler)
func (*Service) RegisterHandler ΒΆ
func (*Service) RegisterStreamHandler ΒΆ
func (s *Service) RegisterStreamHandler(method string, rs parcel.StreamHandler)
Source Files ΒΆ
Directories ΒΆ
Path | Synopsis |
---|---|
_auxiliary
|
|
cmd
|
|
roctl/project
enable project default generator
|
enable project default generator |
internal
|
|
metadata
Package metadata for websocket or socket from rsocket-rpc-go Metadata
|
Package metadata for websocket or socket from rsocket-rpc-go Metadata |
Click to show internal directories.
Click to hide internal directories.