zm

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMasterServer

func RegisterMasterServer(s *grpc.Server, srv MasterServer)

Types

type ConnectionInfo

type ConnectionInfo struct {
	IP                   string   `protobuf:"bytes,1,opt,name=IP,proto3" json:"IP,omitempty"`
	Port                 int32    `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ConnectionInfo) Descriptor

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

func (*ConnectionInfo) GetIP

func (m *ConnectionInfo) GetIP() string

func (*ConnectionInfo) GetPort

func (m *ConnectionInfo) GetPort() int32

func (*ConnectionInfo) ProtoMessage

func (*ConnectionInfo) ProtoMessage()

func (*ConnectionInfo) Reset

func (m *ConnectionInfo) Reset()

func (*ConnectionInfo) String

func (m *ConnectionInfo) String() string

func (*ConnectionInfo) XXX_DiscardUnknown

func (m *ConnectionInfo) XXX_DiscardUnknown()

func (*ConnectionInfo) XXX_Marshal

func (m *ConnectionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectionInfo) XXX_Merge

func (m *ConnectionInfo) XXX_Merge(src proto.Message)

func (*ConnectionInfo) XXX_Size

func (m *ConnectionInfo) XXX_Size() int

func (*ConnectionInfo) XXX_Unmarshal

func (m *ConnectionInfo) XXX_Unmarshal(b []byte) error

type MapQuery

type MapQuery struct {
	Name                 string   `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MapQuery) Descriptor

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

func (*MapQuery) GetName

func (m *MapQuery) GetName() string

func (*MapQuery) ProtoMessage

func (*MapQuery) ProtoMessage()

func (*MapQuery) Reset

func (m *MapQuery) Reset()

func (*MapQuery) String

func (m *MapQuery) String() string

func (*MapQuery) XXX_DiscardUnknown

func (m *MapQuery) XXX_DiscardUnknown()

func (*MapQuery) XXX_Marshal

func (m *MapQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapQuery) XXX_Merge

func (m *MapQuery) XXX_Merge(src proto.Message)

func (*MapQuery) XXX_Size

func (m *MapQuery) XXX_Size() int

func (*MapQuery) XXX_Unmarshal

func (m *MapQuery) XXX_Unmarshal(b []byte) error

type MasterClient

type MasterClient interface {
	WhereIsMap(ctx context.Context, in *MapQuery, opts ...grpc.CallOption) (*ConnectionInfo, error)
	RegisterZone(ctx context.Context, in *ZoneDetails, opts ...grpc.CallOption) (*ZoneRegistered, error)
}

MasterClient is the client API for Master service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMasterClient

func NewMasterClient(cc grpc.ClientConnInterface) MasterClient

type MasterServer

type MasterServer interface {
	WhereIsMap(context.Context, *MapQuery) (*ConnectionInfo, error)
	RegisterZone(context.Context, *ZoneDetails) (*ZoneRegistered, error)
}

MasterServer is the server API for Master service.

type UnimplementedMasterServer

type UnimplementedMasterServer struct {
}

UnimplementedMasterServer can be embedded to have forward compatible implementations.

func (*UnimplementedMasterServer) RegisterZone

func (*UnimplementedMasterServer) WhereIsMap

type World

type World struct {
	IP                   string   `protobuf:"bytes,1,opt,name=IP,proto3" json:"IP,omitempty"`
	Port                 int32    `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*World) Descriptor

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

func (*World) GetIP

func (m *World) GetIP() string

func (*World) GetPort

func (m *World) GetPort() int32

func (*World) ProtoMessage

func (*World) ProtoMessage()

func (*World) Reset

func (m *World) Reset()

func (*World) String

func (m *World) String() string

func (*World) XXX_DiscardUnknown

func (m *World) XXX_DiscardUnknown()

func (*World) XXX_Marshal

func (m *World) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*World) XXX_Merge

func (m *World) XXX_Merge(src proto.Message)

func (*World) XXX_Size

func (m *World) XXX_Size() int

func (*World) XXX_Unmarshal

func (m *World) XXX_Unmarshal(b []byte) error

type ZoneDetails

type ZoneDetails struct {
	Maps                 []string        `protobuf:"bytes,1,rep,name=maps,proto3" json:"maps,omitempty"`
	Conn                 *ConnectionInfo `protobuf:"bytes,2,opt,name=conn,proto3" json:"conn,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*ZoneDetails) Descriptor

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

func (*ZoneDetails) GetConn

func (m *ZoneDetails) GetConn() *ConnectionInfo

func (*ZoneDetails) GetMaps

func (m *ZoneDetails) GetMaps() []string

func (*ZoneDetails) ProtoMessage

func (*ZoneDetails) ProtoMessage()

func (*ZoneDetails) Reset

func (m *ZoneDetails) Reset()

func (*ZoneDetails) String

func (m *ZoneDetails) String() string

func (*ZoneDetails) XXX_DiscardUnknown

func (m *ZoneDetails) XXX_DiscardUnknown()

func (*ZoneDetails) XXX_Marshal

func (m *ZoneDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ZoneDetails) XXX_Merge

func (m *ZoneDetails) XXX_Merge(src proto.Message)

func (*ZoneDetails) XXX_Size

func (m *ZoneDetails) XXX_Size() int

func (*ZoneDetails) XXX_Unmarshal

func (m *ZoneDetails) XXX_Unmarshal(b []byte) error

type ZoneRegistered

type ZoneRegistered struct {
	Success              bool     `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"`
	ZoneID               string   `protobuf:"bytes,2,opt,name=ZoneID,proto3" json:"ZoneID,omitempty"`
	World                *World   `protobuf:"bytes,3,opt,name=World,proto3" json:"World,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ZoneRegistered) Descriptor

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

func (*ZoneRegistered) GetSuccess

func (m *ZoneRegistered) GetSuccess() bool

func (*ZoneRegistered) GetWorld

func (m *ZoneRegistered) GetWorld() *World

func (*ZoneRegistered) GetZoneID

func (m *ZoneRegistered) GetZoneID() string

func (*ZoneRegistered) ProtoMessage

func (*ZoneRegistered) ProtoMessage()

func (*ZoneRegistered) Reset

func (m *ZoneRegistered) Reset()

func (*ZoneRegistered) String

func (m *ZoneRegistered) String() string

func (*ZoneRegistered) XXX_DiscardUnknown

func (m *ZoneRegistered) XXX_DiscardUnknown()

func (*ZoneRegistered) XXX_Marshal

func (m *ZoneRegistered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ZoneRegistered) XXX_Merge

func (m *ZoneRegistered) XXX_Merge(src proto.Message)

func (*ZoneRegistered) XXX_Size

func (m *ZoneRegistered) XXX_Size() int

func (*ZoneRegistered) XXX_Unmarshal

func (m *ZoneRegistered) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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