pusher

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Pusher_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dtalk.pusher.Pusher",
	HandlerType: (*PusherServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PushClient",
			Handler:    _Pusher_PushClient_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api.proto",
}

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

Functions

func RegisterPusherServer

func RegisterPusherServer(s grpc.ServiceRegistrar, srv PusherServer)

Types

type Client

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

func New

func New(etcdAddr, schema, srvName string, dial time.Duration) *Client

func (*Client) PushClient

func (c *Client) PushClient(ctx context.Context, key, from string, data []byte) error

type PushReply

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

func (*PushReply) Descriptor deprecated

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

Deprecated: Use PushReply.ProtoReflect.Descriptor instead.

func (*PushReply) ProtoMessage

func (*PushReply) ProtoMessage()

func (*PushReply) ProtoReflect

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

func (*PushReply) Reset

func (x *PushReply) Reset()

func (*PushReply) String

func (x *PushReply) String() string

type PushReq

type PushReq struct {
	Key       string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	From      string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	Mid       string `protobuf:"bytes,3,opt,name=mid,proto3" json:"mid,omitempty"`
	Target    string `protobuf:"bytes,4,opt,name=target,proto3" json:"target,omitempty"`
	Data      []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	Type      int32  `protobuf:"varint,6,opt,name=type,proto3" json:"type,omitempty"`
	FrameType string `protobuf:"bytes,7,opt,name=frameType,proto3" json:"frameType,omitempty"`
	// contains filtered or unexported fields
}

func (*PushReq) Descriptor deprecated

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

Deprecated: Use PushReq.ProtoReflect.Descriptor instead.

func (*PushReq) GetData

func (x *PushReq) GetData() []byte

func (*PushReq) GetFrameType

func (x *PushReq) GetFrameType() string

func (*PushReq) GetFrom

func (x *PushReq) GetFrom() string

func (*PushReq) GetKey

func (x *PushReq) GetKey() string

func (*PushReq) GetMid

func (x *PushReq) GetMid() string

func (*PushReq) GetTarget

func (x *PushReq) GetTarget() string

func (*PushReq) GetType

func (x *PushReq) GetType() int32

func (*PushReq) ProtoMessage

func (*PushReq) ProtoMessage()

func (*PushReq) ProtoReflect

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

func (*PushReq) Reset

func (x *PushReq) Reset()

func (*PushReq) String

func (x *PushReq) String() string

type PusherClient

type PusherClient interface {
	PushClient(ctx context.Context, in *PushReq, opts ...grpc.CallOption) (*PushReply, error)
}

PusherClient is the client API for Pusher 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 NewPusherClient

func NewPusherClient(cc grpc.ClientConnInterface) PusherClient

type PusherServer

type PusherServer interface {
	PushClient(context.Context, *PushReq) (*PushReply, error)
	// contains filtered or unexported methods
}

PusherServer is the server API for Pusher service. All implementations must embed UnimplementedPusherServer for forward compatibility

type UnimplementedPusherServer

type UnimplementedPusherServer struct {
}

UnimplementedPusherServer must be embedded to have forward compatible implementations.

func (UnimplementedPusherServer) PushClient

type UnsafePusherServer

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

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

Jump to

Keyboard shortcuts

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