jointrpc

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_jointrpc_proto protoreflect.FileDescriptor

Functions

func RegisterJointRPCServer

func RegisterJointRPCServer(s *grpc.Server, srv JointRPCServer)

Types

type ClientAuth

type ClientAuth struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientAuth) Descriptor deprecated

func (*ClientAuth) Descriptor() ([]byte, []int)

Deprecated: Use ClientAuth.ProtoReflect.Descriptor instead.

func (*ClientAuth) GetPassword

func (x *ClientAuth) GetPassword() string

func (*ClientAuth) GetUsername

func (x *ClientAuth) GetUsername() string

func (*ClientAuth) ProtoMessage

func (*ClientAuth) ProtoMessage()

func (*ClientAuth) ProtoReflect

func (x *ClientAuth) ProtoReflect() protoreflect.Message

func (*ClientAuth) Reset

func (x *ClientAuth) Reset()

func (*ClientAuth) String

func (x *ClientAuth) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type JSONRPCCallRequest

type JSONRPCCallRequest struct {
	Auth      *ClientAuth      `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"`
	Envolope  *JSONRPCEnvolope `protobuf:"bytes,2,opt,name=envolope,proto3" json:"envolope,omitempty"`
	Broadcast bool             `protobuf:"varint,3,opt,name=broadcast,proto3" json:"broadcast,omitempty"`
	Timeout   int32            `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"` // the seconds from expire this rpc
	// contains filtered or unexported fields
}

func (*JSONRPCCallRequest) Descriptor deprecated

func (*JSONRPCCallRequest) Descriptor() ([]byte, []int)

Deprecated: Use JSONRPCCallRequest.ProtoReflect.Descriptor instead.

func (*JSONRPCCallRequest) GetAuth

func (x *JSONRPCCallRequest) GetAuth() *ClientAuth

func (*JSONRPCCallRequest) GetBroadcast

func (x *JSONRPCCallRequest) GetBroadcast() bool

func (*JSONRPCCallRequest) GetEnvolope

func (x *JSONRPCCallRequest) GetEnvolope() *JSONRPCEnvolope

func (*JSONRPCCallRequest) GetTimeout

func (x *JSONRPCCallRequest) GetTimeout() int32

func (*JSONRPCCallRequest) ProtoMessage

func (*JSONRPCCallRequest) ProtoMessage()

func (*JSONRPCCallRequest) ProtoReflect

func (x *JSONRPCCallRequest) ProtoReflect() protoreflect.Message

func (*JSONRPCCallRequest) Reset

func (x *JSONRPCCallRequest) Reset()

func (*JSONRPCCallRequest) String

func (x *JSONRPCCallRequest) String() string

type JSONRPCCallResult

type JSONRPCCallResult struct {
	Status   *Status          `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Envolope *JSONRPCEnvolope `protobuf:"bytes,2,opt,name=envolope,proto3" json:"envolope,omitempty"`
	// contains filtered or unexported fields
}

func (*JSONRPCCallResult) Descriptor deprecated

func (*JSONRPCCallResult) Descriptor() ([]byte, []int)

Deprecated: Use JSONRPCCallResult.ProtoReflect.Descriptor instead.

func (*JSONRPCCallResult) GetEnvolope

func (x *JSONRPCCallResult) GetEnvolope() *JSONRPCEnvolope

func (*JSONRPCCallResult) GetStatus

func (x *JSONRPCCallResult) GetStatus() *Status

func (*JSONRPCCallResult) ProtoMessage

func (*JSONRPCCallResult) ProtoMessage()

func (*JSONRPCCallResult) ProtoReflect

func (x *JSONRPCCallResult) ProtoReflect() protoreflect.Message

func (*JSONRPCCallResult) Reset

func (x *JSONRPCCallResult) Reset()

func (*JSONRPCCallResult) String

func (x *JSONRPCCallResult) String() string

type JSONRPCEnvolope

type JSONRPCEnvolope struct {
	Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // json encoded rpc message
	// contains filtered or unexported fields
}

func (*JSONRPCEnvolope) Descriptor deprecated

func (*JSONRPCEnvolope) Descriptor() ([]byte, []int)

Deprecated: Use JSONRPCEnvolope.ProtoReflect.Descriptor instead.

func (*JSONRPCEnvolope) GetBody

func (x *JSONRPCEnvolope) GetBody() string

func (*JSONRPCEnvolope) ProtoMessage

func (*JSONRPCEnvolope) ProtoMessage()

func (*JSONRPCEnvolope) ProtoReflect

func (x *JSONRPCEnvolope) ProtoReflect() protoreflect.Message

func (*JSONRPCEnvolope) Reset

func (x *JSONRPCEnvolope) Reset()

func (*JSONRPCEnvolope) String

func (x *JSONRPCEnvolope) String() string

type JSONRPCNotifyRequest

type JSONRPCNotifyRequest struct {
	Auth      *ClientAuth      `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"`
	Envolope  *JSONRPCEnvolope `protobuf:"bytes,2,opt,name=envolope,proto3" json:"envolope,omitempty"`
	Broadcast bool             `protobuf:"varint,3,opt,name=broadcast,proto3" json:"broadcast,omitempty"`
	// contains filtered or unexported fields
}

func (*JSONRPCNotifyRequest) Descriptor deprecated

func (*JSONRPCNotifyRequest) Descriptor() ([]byte, []int)

Deprecated: Use JSONRPCNotifyRequest.ProtoReflect.Descriptor instead.

func (*JSONRPCNotifyRequest) GetAuth

func (x *JSONRPCNotifyRequest) GetAuth() *ClientAuth

func (*JSONRPCNotifyRequest) GetBroadcast

func (x *JSONRPCNotifyRequest) GetBroadcast() bool

func (*JSONRPCNotifyRequest) GetEnvolope

func (x *JSONRPCNotifyRequest) GetEnvolope() *JSONRPCEnvolope

func (*JSONRPCNotifyRequest) ProtoMessage

func (*JSONRPCNotifyRequest) ProtoMessage()

func (*JSONRPCNotifyRequest) ProtoReflect

func (x *JSONRPCNotifyRequest) ProtoReflect() protoreflect.Message

func (*JSONRPCNotifyRequest) Reset

func (x *JSONRPCNotifyRequest) Reset()

func (*JSONRPCNotifyRequest) String

func (x *JSONRPCNotifyRequest) String() string

type JSONRPCNotifyResponse

type JSONRPCNotifyResponse struct {
	Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Text   string  `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*JSONRPCNotifyResponse) Descriptor deprecated

func (*JSONRPCNotifyResponse) Descriptor() ([]byte, []int)

Deprecated: Use JSONRPCNotifyResponse.ProtoReflect.Descriptor instead.

func (*JSONRPCNotifyResponse) GetStatus

func (x *JSONRPCNotifyResponse) GetStatus() *Status

func (*JSONRPCNotifyResponse) GetText

func (x *JSONRPCNotifyResponse) GetText() string

func (*JSONRPCNotifyResponse) ProtoMessage

func (*JSONRPCNotifyResponse) ProtoMessage()

func (*JSONRPCNotifyResponse) ProtoReflect

func (x *JSONRPCNotifyResponse) ProtoReflect() protoreflect.Message

func (*JSONRPCNotifyResponse) Reset

func (x *JSONRPCNotifyResponse) Reset()

func (*JSONRPCNotifyResponse) String

func (x *JSONRPCNotifyResponse) String() string

type JointRPCClient

type JointRPCClient interface {
	Call(ctx context.Context, in *JSONRPCCallRequest, opts ...grpc.CallOption) (*JSONRPCCallResult, error)
	Notify(ctx context.Context, in *JSONRPCNotifyRequest, opts ...grpc.CallOption) (*JSONRPCNotifyResponse, error)
	ListMethods(ctx context.Context, in *ListMethodsRequest, opts ...grpc.CallOption) (*ListMethodsResponse, error)
	ListDelegates(ctx context.Context, in *ListDelegatesRequest, opts ...grpc.CallOption) (*ListDelegatesResponse, error)
	// request/response dual streams
	Live(ctx context.Context, opts ...grpc.CallOption) (JointRPC_LiveClient, error)
}

JointRPCClient is the client API for JointRPC service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewJointRPCClient

func NewJointRPCClient(cc grpc.ClientConnInterface) JointRPCClient

type JointRPCServer

type JointRPCServer interface {
	Call(context.Context, *JSONRPCCallRequest) (*JSONRPCCallResult, error)
	Notify(context.Context, *JSONRPCNotifyRequest) (*JSONRPCNotifyResponse, error)
	ListMethods(context.Context, *ListMethodsRequest) (*ListMethodsResponse, error)
	ListDelegates(context.Context, *ListDelegatesRequest) (*ListDelegatesResponse, error)
	// request/response dual streams
	Live(JointRPC_LiveServer) error
	// contains filtered or unexported methods
}

JointRPCServer is the server API for JointRPC service. All implementations must embed UnimplementedJointRPCServer for forward compatibility

type JointRPC_LiveClient

type JointRPC_LiveClient interface {
	Send(*JSONRPCEnvolope) error
	Recv() (*JSONRPCEnvolope, error)
	grpc.ClientStream
}

type JointRPC_LiveServer

type JointRPC_LiveServer interface {
	Send(*JSONRPCEnvolope) error
	Recv() (*JSONRPCEnvolope, error)
	grpc.ServerStream
}

type ListDelegatesRequest

type ListDelegatesRequest struct {
	Auth *ClientAuth `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"`
	// contains filtered or unexported fields
}

func (*ListDelegatesRequest) Descriptor deprecated

func (*ListDelegatesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListDelegatesRequest.ProtoReflect.Descriptor instead.

func (*ListDelegatesRequest) GetAuth

func (x *ListDelegatesRequest) GetAuth() *ClientAuth

func (*ListDelegatesRequest) ProtoMessage

func (*ListDelegatesRequest) ProtoMessage()

func (*ListDelegatesRequest) ProtoReflect

func (x *ListDelegatesRequest) ProtoReflect() protoreflect.Message

func (*ListDelegatesRequest) Reset

func (x *ListDelegatesRequest) Reset()

func (*ListDelegatesRequest) String

func (x *ListDelegatesRequest) String() string

type ListDelegatesResponse

type ListDelegatesResponse struct {
	Status    *Status  `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Delegates []string `protobuf:"bytes,2,rep,name=delegates,proto3" json:"delegates,omitempty"`
	// contains filtered or unexported fields
}

func (*ListDelegatesResponse) Descriptor deprecated

func (*ListDelegatesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListDelegatesResponse.ProtoReflect.Descriptor instead.

func (*ListDelegatesResponse) GetDelegates

func (x *ListDelegatesResponse) GetDelegates() []string

func (*ListDelegatesResponse) GetStatus

func (x *ListDelegatesResponse) GetStatus() *Status

func (*ListDelegatesResponse) ProtoMessage

func (*ListDelegatesResponse) ProtoMessage()

func (*ListDelegatesResponse) ProtoReflect

func (x *ListDelegatesResponse) ProtoReflect() protoreflect.Message

func (*ListDelegatesResponse) Reset

func (x *ListDelegatesResponse) Reset()

func (*ListDelegatesResponse) String

func (x *ListDelegatesResponse) String() string

type ListMethodsRequest

type ListMethodsRequest struct {
	Auth *ClientAuth `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMethodsRequest) Descriptor deprecated

func (*ListMethodsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListMethodsRequest.ProtoReflect.Descriptor instead.

func (*ListMethodsRequest) GetAuth

func (x *ListMethodsRequest) GetAuth() *ClientAuth

func (*ListMethodsRequest) ProtoMessage

func (*ListMethodsRequest) ProtoMessage()

func (*ListMethodsRequest) ProtoReflect

func (x *ListMethodsRequest) ProtoReflect() protoreflect.Message

func (*ListMethodsRequest) Reset

func (x *ListMethodsRequest) Reset()

func (*ListMethodsRequest) String

func (x *ListMethodsRequest) String() string

type ListMethodsResponse

type ListMethodsResponse struct {
	Status  *Status       `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Methods []*MethodInfo `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMethodsResponse) Descriptor deprecated

func (*ListMethodsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListMethodsResponse.ProtoReflect.Descriptor instead.

func (*ListMethodsResponse) GetMethods

func (x *ListMethodsResponse) GetMethods() []*MethodInfo

func (*ListMethodsResponse) GetStatus

func (x *ListMethodsResponse) GetStatus() *Status

func (*ListMethodsResponse) ProtoMessage

func (*ListMethodsResponse) ProtoMessage()

func (*ListMethodsResponse) ProtoReflect

func (x *ListMethodsResponse) ProtoReflect() protoreflect.Message

func (*ListMethodsResponse) Reset

func (x *ListMethodsResponse) Reset()

func (*ListMethodsResponse) String

func (x *ListMethodsResponse) String() string

type MethodInfo

type MethodInfo struct {
	Name       string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Help       string `protobuf:"bytes,2,opt,name=help,proto3" json:"help,omitempty"`
	SchemaJson string `protobuf:"bytes,3,opt,name=schema_json,json=schemaJson,proto3" json:"schema_json,omitempty"`
	// contains filtered or unexported fields
}

func (*MethodInfo) Descriptor deprecated

func (*MethodInfo) Descriptor() ([]byte, []int)

Deprecated: Use MethodInfo.ProtoReflect.Descriptor instead.

func (*MethodInfo) GetHelp

func (x *MethodInfo) GetHelp() string

func (*MethodInfo) GetName

func (x *MethodInfo) GetName() string

func (*MethodInfo) GetSchemaJson

func (x *MethodInfo) GetSchemaJson() string

func (*MethodInfo) ProtoMessage

func (*MethodInfo) ProtoMessage()

func (*MethodInfo) ProtoReflect

func (x *MethodInfo) ProtoReflect() protoreflect.Message

func (*MethodInfo) Reset

func (x *MethodInfo) Reset()

func (*MethodInfo) String

func (x *MethodInfo) String() string

type Status

type Status struct {
	Code   int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

func (*Status) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetCode

func (x *Status) GetCode() int32

func (*Status) GetReason

func (x *Status) GetReason() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type UnimplementedJointRPCServer

type UnimplementedJointRPCServer struct {
}

UnimplementedJointRPCServer must be embedded to have forward compatible implementations.

func (UnimplementedJointRPCServer) Call

func (UnimplementedJointRPCServer) ListDelegates

func (UnimplementedJointRPCServer) ListMethods

func (UnimplementedJointRPCServer) Live

func (UnimplementedJointRPCServer) Notify

type UnsafeJointRPCServer

type UnsafeJointRPCServer interface {
	// contains filtered or unexported methods
}

UnsafeJointRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to JointRPCServer will result in compilation errors.

Jump to

Keyboard shortcuts

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