bridge

package
v0.0.0-...-cdd6459 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Rpc_Write_FullMethodName = "/maudit.bridge.Rpc/Write"
	Rpc_Read_FullMethodName  = "/maudit.bridge.Rpc/Read"
)
View Source
const AppName = "bridge"

Variables

View Source
var File_apps_bridge_pb_model_proto protoreflect.FileDescriptor
View Source
var File_apps_bridge_pb_rpc_proto protoreflect.FileDescriptor
View Source
var Rpc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "maudit.bridge.Rpc",
	HandlerType: (*RpcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Write",
			Handler:    _Rpc_Write_Handler,
		},
		{
			MethodName: "Read",
			Handler:    _Rpc_Read_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apps/bridge/pb/rpc.proto",
}

Rpc_ServiceDesc is the grpc.ServiceDesc for Rpc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRpcServer

func RegisterRpcServer(s grpc.ServiceRegistrar, srv RpcServer)

Types

type ReadRequest

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

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

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

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type RpcClient

type RpcClient interface {
	Write(ctx context.Context, in *event.Event, opts ...grpc.CallOption) (*WriteResponse, error)
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*event.Event, error)
}

RpcClient is the client API for Rpc 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 NewRpcClient

func NewRpcClient(cc grpc.ClientConnInterface) RpcClient

type RpcServer

type RpcServer interface {
	Write(context.Context, *event.Event) (*WriteResponse, error)
	Read(context.Context, *ReadRequest) (*event.Event, error)
	// contains filtered or unexported methods
}

RpcServer is the server API for Rpc service. All implementations must embed UnimplementedRpcServer for forward compatibility

type Service

type Service interface {
	RpcServer
}

func GetSvc

func GetSvc() Service

type UnimplementedRpcServer

type UnimplementedRpcServer struct {
}

UnimplementedRpcServer must be embedded to have forward compatible implementations.

func (UnimplementedRpcServer) Read

func (UnimplementedRpcServer) Write

type UnsafeRpcServer

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

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

type WriteResponse

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

func (*WriteResponse) Descriptor deprecated

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

Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) ProtoReflect

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

func (*WriteResponse) Reset

func (x *WriteResponse) Reset()

func (*WriteResponse) String

func (x *WriteResponse) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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