v1

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1 is a generated protocol buffer package.

It is generated from these files:

app/service/main/broadcast/api/grpc/v1/api.proto

It has these top-level messages:

CloseReply
CloseReq
PingReply
PingReq
ConnectReq
ConnectReply
DisconnectReq
DisconnectReply
HeartbeatReq
HeartbeatReply
OnlineReq
OnlineReply
ReceiveReq
ReceiveReply
ServerListReq
ServerListReply
Backoff

Index

Constants

View Source
const (
	DiscoveryID = "push.service.broadcast"
)

.

Variables

View Source
var (
	ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowApi   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterZergServer

func RegisterZergServer(s *grpc.Server, srv ZergServer)

Types

type Backoff

type Backoff struct {
	MaxDelay  int32   `protobuf:"varint,1,opt,name=MaxDelay,proto3" json:"max_delay"`
	BaseDelay int32   `protobuf:"varint,2,opt,name=BaseDelay,proto3" json:"base_delay"`
	Factor    float32 `protobuf:"fixed32,3,opt,name=Factor,proto3" json:"factor"`
	Jitter    float32 `protobuf:"fixed32,4,opt,name=Jitter,proto3" json:"jitter"`
}

func (*Backoff) Descriptor

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

func (*Backoff) GetBaseDelay

func (m *Backoff) GetBaseDelay() int32

func (*Backoff) GetFactor

func (m *Backoff) GetFactor() float32

func (*Backoff) GetJitter

func (m *Backoff) GetJitter() float32

func (*Backoff) GetMaxDelay

func (m *Backoff) GetMaxDelay() int32

func (*Backoff) Marshal

func (m *Backoff) Marshal() (dAtA []byte, err error)

func (*Backoff) MarshalTo

func (m *Backoff) MarshalTo(dAtA []byte) (int, error)

func (*Backoff) ProtoMessage

func (*Backoff) ProtoMessage()

func (*Backoff) Reset

func (m *Backoff) Reset()

func (*Backoff) Size

func (m *Backoff) Size() (n int)

func (*Backoff) String

func (m *Backoff) String() string

func (*Backoff) Unmarshal

func (m *Backoff) Unmarshal(dAtA []byte) error

type CloseReply

type CloseReply struct {
}

func (*CloseReply) Descriptor

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

func (*CloseReply) Marshal

func (m *CloseReply) Marshal() (dAtA []byte, err error)

func (*CloseReply) MarshalTo

func (m *CloseReply) MarshalTo(dAtA []byte) (int, error)

func (*CloseReply) ProtoMessage

func (*CloseReply) ProtoMessage()

func (*CloseReply) Reset

func (m *CloseReply) Reset()

func (*CloseReply) Size

func (m *CloseReply) Size() (n int)

func (*CloseReply) String

func (m *CloseReply) String() string

func (*CloseReply) Unmarshal

func (m *CloseReply) Unmarshal(dAtA []byte) error

type CloseReq

type CloseReq struct {
}

func (*CloseReq) Descriptor

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

func (*CloseReq) Marshal

func (m *CloseReq) Marshal() (dAtA []byte, err error)

func (*CloseReq) MarshalTo

func (m *CloseReq) MarshalTo(dAtA []byte) (int, error)

func (*CloseReq) ProtoMessage

func (*CloseReq) ProtoMessage()

func (*CloseReq) Reset

func (m *CloseReq) Reset()

func (*CloseReq) Size

func (m *CloseReq) Size() (n int)

func (*CloseReq) String

func (m *CloseReq) String() string

func (*CloseReq) Unmarshal

func (m *CloseReq) Unmarshal(dAtA []byte) error

type ConnectReply

type ConnectReply struct {
	Mid      int64   `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"`
	Key      string  `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	RoomID   string  `protobuf:"bytes,3,opt,name=roomID,proto3" json:"roomID,omitempty"`
	Platform string  `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"`
	Accepts  []int32 `protobuf:"varint,5,rep,packed,name=accepts" json:"accepts,omitempty"`
}

func (*ConnectReply) Descriptor

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

func (*ConnectReply) GetAccepts

func (m *ConnectReply) GetAccepts() []int32

func (*ConnectReply) GetKey

func (m *ConnectReply) GetKey() string

func (*ConnectReply) GetMid

func (m *ConnectReply) GetMid() int64

func (*ConnectReply) GetPlatform

func (m *ConnectReply) GetPlatform() string

func (*ConnectReply) GetRoomID

func (m *ConnectReply) GetRoomID() string

func (*ConnectReply) Marshal

func (m *ConnectReply) Marshal() (dAtA []byte, err error)

func (*ConnectReply) MarshalTo

func (m *ConnectReply) MarshalTo(dAtA []byte) (int, error)

func (*ConnectReply) ProtoMessage

func (*ConnectReply) ProtoMessage()

func (*ConnectReply) Reset

func (m *ConnectReply) Reset()

func (*ConnectReply) Size

func (m *ConnectReply) Size() (n int)

func (*ConnectReply) String

func (m *ConnectReply) String() string

func (*ConnectReply) Unmarshal

func (m *ConnectReply) Unmarshal(dAtA []byte) error

type ConnectReq

type ConnectReq struct {
	Server    string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	ServerKey string `protobuf:"bytes,2,opt,name=serverKey,proto3" json:"serverKey,omitempty"`
	Cookie    string `protobuf:"bytes,3,opt,name=cookie,proto3" json:"cookie,omitempty"`
	Token     []byte `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
}

func (*ConnectReq) Descriptor

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

func (*ConnectReq) GetCookie

func (m *ConnectReq) GetCookie() string

func (*ConnectReq) GetServer

func (m *ConnectReq) GetServer() string

func (*ConnectReq) GetServerKey

func (m *ConnectReq) GetServerKey() string

func (*ConnectReq) GetToken

func (m *ConnectReq) GetToken() []byte

func (*ConnectReq) Marshal

func (m *ConnectReq) Marshal() (dAtA []byte, err error)

func (*ConnectReq) MarshalTo

func (m *ConnectReq) MarshalTo(dAtA []byte) (int, error)

func (*ConnectReq) ProtoMessage

func (*ConnectReq) ProtoMessage()

func (*ConnectReq) Reset

func (m *ConnectReq) Reset()

func (*ConnectReq) Size

func (m *ConnectReq) Size() (n int)

func (*ConnectReq) String

func (m *ConnectReq) String() string

func (*ConnectReq) Unmarshal

func (m *ConnectReq) Unmarshal(dAtA []byte) error

type DisconnectReply

type DisconnectReply struct {
	Has bool `protobuf:"varint,1,opt,name=has,proto3" json:"has,omitempty"`
}

func (*DisconnectReply) Descriptor

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

func (*DisconnectReply) GetHas

func (m *DisconnectReply) GetHas() bool

func (*DisconnectReply) Marshal

func (m *DisconnectReply) Marshal() (dAtA []byte, err error)

func (*DisconnectReply) MarshalTo

func (m *DisconnectReply) MarshalTo(dAtA []byte) (int, error)

func (*DisconnectReply) ProtoMessage

func (*DisconnectReply) ProtoMessage()

func (*DisconnectReply) Reset

func (m *DisconnectReply) Reset()

func (*DisconnectReply) Size

func (m *DisconnectReply) Size() (n int)

func (*DisconnectReply) String

func (m *DisconnectReply) String() string

func (*DisconnectReply) Unmarshal

func (m *DisconnectReply) Unmarshal(dAtA []byte) error

type DisconnectReq

type DisconnectReq struct {
	Mid    int64  `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"`
	Key    string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Server string `protobuf:"bytes,3,opt,name=server,proto3" json:"server,omitempty"`
}

func (*DisconnectReq) Descriptor

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

func (*DisconnectReq) GetKey

func (m *DisconnectReq) GetKey() string

func (*DisconnectReq) GetMid

func (m *DisconnectReq) GetMid() int64

func (*DisconnectReq) GetServer

func (m *DisconnectReq) GetServer() string

func (*DisconnectReq) Marshal

func (m *DisconnectReq) Marshal() (dAtA []byte, err error)

func (*DisconnectReq) MarshalTo

func (m *DisconnectReq) MarshalTo(dAtA []byte) (int, error)

func (*DisconnectReq) ProtoMessage

func (*DisconnectReq) ProtoMessage()

func (*DisconnectReq) Reset

func (m *DisconnectReq) Reset()

func (*DisconnectReq) Size

func (m *DisconnectReq) Size() (n int)

func (*DisconnectReq) String

func (m *DisconnectReq) String() string

func (*DisconnectReq) Unmarshal

func (m *DisconnectReq) Unmarshal(dAtA []byte) error

type HeartbeatReply

type HeartbeatReply struct {
}

func (*HeartbeatReply) Descriptor

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

func (*HeartbeatReply) Marshal

func (m *HeartbeatReply) Marshal() (dAtA []byte, err error)

func (*HeartbeatReply) MarshalTo

func (m *HeartbeatReply) MarshalTo(dAtA []byte) (int, error)

func (*HeartbeatReply) ProtoMessage

func (*HeartbeatReply) ProtoMessage()

func (*HeartbeatReply) Reset

func (m *HeartbeatReply) Reset()

func (*HeartbeatReply) Size

func (m *HeartbeatReply) Size() (n int)

func (*HeartbeatReply) String

func (m *HeartbeatReply) String() string

func (*HeartbeatReply) Unmarshal

func (m *HeartbeatReply) Unmarshal(dAtA []byte) error

type HeartbeatReq

type HeartbeatReq struct {
	Mid    int64  `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"`
	Key    string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Server string `protobuf:"bytes,3,opt,name=server,proto3" json:"server,omitempty"`
}

func (*HeartbeatReq) Descriptor

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

func (*HeartbeatReq) GetKey

func (m *HeartbeatReq) GetKey() string

func (*HeartbeatReq) GetMid

func (m *HeartbeatReq) GetMid() int64

func (*HeartbeatReq) GetServer

func (m *HeartbeatReq) GetServer() string

func (*HeartbeatReq) Marshal

func (m *HeartbeatReq) Marshal() (dAtA []byte, err error)

func (*HeartbeatReq) MarshalTo

func (m *HeartbeatReq) MarshalTo(dAtA []byte) (int, error)

func (*HeartbeatReq) ProtoMessage

func (*HeartbeatReq) ProtoMessage()

func (*HeartbeatReq) Reset

func (m *HeartbeatReq) Reset()

func (*HeartbeatReq) Size

func (m *HeartbeatReq) Size() (n int)

func (*HeartbeatReq) String

func (m *HeartbeatReq) String() string

func (*HeartbeatReq) Unmarshal

func (m *HeartbeatReq) Unmarshal(dAtA []byte) error

type OnlineReply

type OnlineReply struct {
	RoomCount map[string]int32 `` /* 153-byte string literal not displayed */
}

func (*OnlineReply) Descriptor

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

func (*OnlineReply) GetRoomCount

func (m *OnlineReply) GetRoomCount() map[string]int32

func (*OnlineReply) Marshal

func (m *OnlineReply) Marshal() (dAtA []byte, err error)

func (*OnlineReply) MarshalTo

func (m *OnlineReply) MarshalTo(dAtA []byte) (int, error)

func (*OnlineReply) ProtoMessage

func (*OnlineReply) ProtoMessage()

func (*OnlineReply) Reset

func (m *OnlineReply) Reset()

func (*OnlineReply) Size

func (m *OnlineReply) Size() (n int)

func (*OnlineReply) String

func (m *OnlineReply) String() string

func (*OnlineReply) Unmarshal

func (m *OnlineReply) Unmarshal(dAtA []byte) error

type OnlineReq

type OnlineReq struct {
	Server    string           `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	RoomCount map[string]int32 `` /* 153-byte string literal not displayed */
	Sharding  int32            `protobuf:"varint,3,opt,name=sharding,proto3" json:"sharding,omitempty"`
}

func (*OnlineReq) Descriptor

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

func (*OnlineReq) GetRoomCount

func (m *OnlineReq) GetRoomCount() map[string]int32

func (*OnlineReq) GetServer

func (m *OnlineReq) GetServer() string

func (*OnlineReq) GetSharding

func (m *OnlineReq) GetSharding() int32

func (*OnlineReq) Marshal

func (m *OnlineReq) Marshal() (dAtA []byte, err error)

func (*OnlineReq) MarshalTo

func (m *OnlineReq) MarshalTo(dAtA []byte) (int, error)

func (*OnlineReq) ProtoMessage

func (*OnlineReq) ProtoMessage()

func (*OnlineReq) Reset

func (m *OnlineReq) Reset()

func (*OnlineReq) Size

func (m *OnlineReq) Size() (n int)

func (*OnlineReq) String

func (m *OnlineReq) String() string

func (*OnlineReq) Unmarshal

func (m *OnlineReq) Unmarshal(dAtA []byte) error

type PingReply

type PingReply struct {
}

func (*PingReply) Descriptor

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

func (*PingReply) Marshal

func (m *PingReply) Marshal() (dAtA []byte, err error)

func (*PingReply) MarshalTo

func (m *PingReply) MarshalTo(dAtA []byte) (int, error)

func (*PingReply) ProtoMessage

func (*PingReply) ProtoMessage()

func (*PingReply) Reset

func (m *PingReply) Reset()

func (*PingReply) Size

func (m *PingReply) Size() (n int)

func (*PingReply) String

func (m *PingReply) String() string

func (*PingReply) Unmarshal

func (m *PingReply) Unmarshal(dAtA []byte) error

type PingReq

type PingReq struct {
}

func (*PingReq) Descriptor

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

func (*PingReq) Marshal

func (m *PingReq) Marshal() (dAtA []byte, err error)

func (*PingReq) MarshalTo

func (m *PingReq) MarshalTo(dAtA []byte) (int, error)

func (*PingReq) ProtoMessage

func (*PingReq) ProtoMessage()

func (*PingReq) Reset

func (m *PingReq) Reset()

func (*PingReq) Size

func (m *PingReq) Size() (n int)

func (*PingReq) String

func (m *PingReq) String() string

func (*PingReq) Unmarshal

func (m *PingReq) Unmarshal(dAtA []byte) error

type ReceiveReply

type ReceiveReply struct {
	Proto *push_service_broadcast_model.Proto `protobuf:"bytes,1,opt,name=proto" json:"proto,omitempty"`
}

func (*ReceiveReply) Descriptor

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

func (*ReceiveReply) GetProto

func (*ReceiveReply) Marshal

func (m *ReceiveReply) Marshal() (dAtA []byte, err error)

func (*ReceiveReply) MarshalTo

func (m *ReceiveReply) MarshalTo(dAtA []byte) (int, error)

func (*ReceiveReply) ProtoMessage

func (*ReceiveReply) ProtoMessage()

func (*ReceiveReply) Reset

func (m *ReceiveReply) Reset()

func (*ReceiveReply) Size

func (m *ReceiveReply) Size() (n int)

func (*ReceiveReply) String

func (m *ReceiveReply) String() string

func (*ReceiveReply) Unmarshal

func (m *ReceiveReply) Unmarshal(dAtA []byte) error

type ReceiveReq

type ReceiveReq struct {
	Mid   int64                               `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"`
	Proto *push_service_broadcast_model.Proto `protobuf:"bytes,2,opt,name=proto" json:"proto,omitempty"`
}

func (*ReceiveReq) Descriptor

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

func (*ReceiveReq) GetMid

func (m *ReceiveReq) GetMid() int64

func (*ReceiveReq) GetProto

func (*ReceiveReq) Marshal

func (m *ReceiveReq) Marshal() (dAtA []byte, err error)

func (*ReceiveReq) MarshalTo

func (m *ReceiveReq) MarshalTo(dAtA []byte) (int, error)

func (*ReceiveReq) ProtoMessage

func (*ReceiveReq) ProtoMessage()

func (*ReceiveReq) Reset

func (m *ReceiveReq) Reset()

func (*ReceiveReq) Size

func (m *ReceiveReq) Size() (n int)

func (*ReceiveReq) String

func (m *ReceiveReq) String() string

func (*ReceiveReq) Unmarshal

func (m *ReceiveReq) Unmarshal(dAtA []byte) error

type ServerListReply

type ServerListReply struct {
	Domain       string   `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain"`
	TcpPort      int32    `protobuf:"varint,2,opt,name=tcpPort,proto3" json:"tcp_port"`
	WsPort       int32    `protobuf:"varint,3,opt,name=wsPort,proto3" json:"ws_port"`
	WssPort      int32    `protobuf:"varint,4,opt,name=wssPort,proto3" json:"wss_port"`
	Heartbeat    int32    `protobuf:"varint,5,opt,name=heartbeat,proto3" json:"heartbeat"`
	Nodes        []string `protobuf:"bytes,6,rep,name=nodes" json:"nodes"`
	Backoff      *Backoff `protobuf:"bytes,7,opt,name=backoff" json:"backoff"`
	HeartbeatMax int32    `protobuf:"varint,8,opt,name=heartbeatMax,proto3" json:"heartbeat_max"`
}

func (*ServerListReply) Descriptor

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

func (*ServerListReply) GetBackoff

func (m *ServerListReply) GetBackoff() *Backoff

func (*ServerListReply) GetDomain

func (m *ServerListReply) GetDomain() string

func (*ServerListReply) GetHeartbeat

func (m *ServerListReply) GetHeartbeat() int32

func (*ServerListReply) GetHeartbeatMax

func (m *ServerListReply) GetHeartbeatMax() int32

func (*ServerListReply) GetNodes

func (m *ServerListReply) GetNodes() []string

func (*ServerListReply) GetTcpPort

func (m *ServerListReply) GetTcpPort() int32

func (*ServerListReply) GetWsPort

func (m *ServerListReply) GetWsPort() int32

func (*ServerListReply) GetWssPort

func (m *ServerListReply) GetWssPort() int32

func (*ServerListReply) Marshal

func (m *ServerListReply) Marshal() (dAtA []byte, err error)

func (*ServerListReply) MarshalTo

func (m *ServerListReply) MarshalTo(dAtA []byte) (int, error)

func (*ServerListReply) ProtoMessage

func (*ServerListReply) ProtoMessage()

func (*ServerListReply) Reset

func (m *ServerListReply) Reset()

func (*ServerListReply) Size

func (m *ServerListReply) Size() (n int)

func (*ServerListReply) String

func (m *ServerListReply) String() string

func (*ServerListReply) Unmarshal

func (m *ServerListReply) Unmarshal(dAtA []byte) error

type ServerListReq

type ServerListReq struct {
	Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"`
}

func (*ServerListReq) Descriptor

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

func (*ServerListReq) GetPlatform

func (m *ServerListReq) GetPlatform() string

func (*ServerListReq) Marshal

func (m *ServerListReq) Marshal() (dAtA []byte, err error)

func (*ServerListReq) MarshalTo

func (m *ServerListReq) MarshalTo(dAtA []byte) (int, error)

func (*ServerListReq) ProtoMessage

func (*ServerListReq) ProtoMessage()

func (*ServerListReq) Reset

func (m *ServerListReq) Reset()

func (*ServerListReq) Size

func (m *ServerListReq) Size() (n int)

func (*ServerListReq) String

func (m *ServerListReq) String() string

func (*ServerListReq) Unmarshal

func (m *ServerListReq) Unmarshal(dAtA []byte) error

type ZergClient

type ZergClient interface {
	// Ping Service
	Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingReply, error)
	// Close Service
	Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*CloseReply, error)
	// Connect
	Connect(ctx context.Context, in *ConnectReq, opts ...grpc.CallOption) (*ConnectReply, error)
	// Disconnect
	Disconnect(ctx context.Context, in *DisconnectReq, opts ...grpc.CallOption) (*DisconnectReply, error)
	// Heartbeat
	Heartbeat(ctx context.Context, in *HeartbeatReq, opts ...grpc.CallOption) (*HeartbeatReply, error)
	// RenewOnline
	RenewOnline(ctx context.Context, in *OnlineReq, opts ...grpc.CallOption) (*OnlineReply, error)
	// Receive
	Receive(ctx context.Context, in *ReceiveReq, opts ...grpc.CallOption) (*ReceiveReply, error)
	// ServerList
	ServerList(ctx context.Context, in *ServerListReq, opts ...grpc.CallOption) (*ServerListReply, error)
}

func NewClient

func NewClient(conf *warden.ClientConfig, opts ...grpc.DialOption) (ZergClient, error)

NewClient .

func NewZergClient

func NewZergClient(cc *grpc.ClientConn) ZergClient

type ZergServer

type ZergServer interface {
	// Ping Service
	Ping(context.Context, *PingReq) (*PingReply, error)
	// Close Service
	Close(context.Context, *CloseReq) (*CloseReply, error)
	// Connect
	Connect(context.Context, *ConnectReq) (*ConnectReply, error)
	// Disconnect
	Disconnect(context.Context, *DisconnectReq) (*DisconnectReply, error)
	// Heartbeat
	Heartbeat(context.Context, *HeartbeatReq) (*HeartbeatReply, error)
	// RenewOnline
	RenewOnline(context.Context, *OnlineReq) (*OnlineReply, error)
	// Receive
	Receive(context.Context, *ReceiveReq) (*ReceiveReply, error)
	// ServerList
	ServerList(context.Context, *ServerListReq) (*ServerListReply, error)
}

Jump to

Keyboard shortcuts

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