server_discovery

package
v0.0.0-...-5b44b94 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_server_discovery_proto protoreflect.FileDescriptor
View Source
var ServerDiscovery_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "towerdefence.cc.service.server_discovery.ServerDiscovery",
	HandlerType: (*ServerDiscoveryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSuggestedLobbyServer",
			Handler:    _ServerDiscovery_GetSuggestedLobbyServer_Handler,
		},
		{
			MethodName: "GetSuggestedOtpServer",
			Handler:    _ServerDiscovery_GetSuggestedOtpServer_Handler,
		},
		{
			MethodName: "GetSuggestedTowerDefenceServer",
			Handler:    _ServerDiscovery_GetSuggestedTowerDefenceServer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server_discovery.proto",
}

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

Functions

func RegisterServerDiscoveryServer

func RegisterServerDiscoveryServer(s grpc.ServiceRegistrar, srv ServerDiscoveryServer)

Types

type ConnectableServer

type ConnectableServer struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Port    uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectableServer) Descriptor deprecated

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

Deprecated: Use ConnectableServer.ProtoReflect.Descriptor instead.

func (*ConnectableServer) GetAddress

func (x *ConnectableServer) GetAddress() string

func (*ConnectableServer) GetId

func (x *ConnectableServer) GetId() string

func (*ConnectableServer) GetPort

func (x *ConnectableServer) GetPort() uint32

func (*ConnectableServer) ProtoMessage

func (*ConnectableServer) ProtoMessage()

func (*ConnectableServer) ProtoReflect

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

func (*ConnectableServer) Reset

func (x *ConnectableServer) Reset()

func (*ConnectableServer) String

func (x *ConnectableServer) String() string

type LobbyServer

type LobbyServer struct {
	ConnectableServer *ConnectableServer `protobuf:"bytes,1,opt,name=connectable_server,json=connectableServer,proto3" json:"connectable_server,omitempty"` //  uint32 number = 2; // Lobby #x - currently not assigned
	// contains filtered or unexported fields
}

func (*LobbyServer) Descriptor deprecated

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

Deprecated: Use LobbyServer.ProtoReflect.Descriptor instead.

func (*LobbyServer) GetConnectableServer

func (x *LobbyServer) GetConnectableServer() *ConnectableServer

func (*LobbyServer) ProtoMessage

func (*LobbyServer) ProtoMessage()

func (*LobbyServer) ProtoReflect

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

func (*LobbyServer) Reset

func (x *LobbyServer) Reset()

func (*LobbyServer) String

func (x *LobbyServer) String() string

type ServerDiscoveryClient

type ServerDiscoveryClient interface {
	GetSuggestedLobbyServer(ctx context.Context, in *ServerRequest, opts ...grpc.CallOption) (*LobbyServer, error)
	GetSuggestedOtpServer(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ConnectableServer, error)
	GetSuggestedTowerDefenceServer(ctx context.Context, in *TowerDefenceServerRequest, opts ...grpc.CallOption) (*ConnectableServer, error)
}

ServerDiscoveryClient is the client API for ServerDiscovery 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.

type ServerDiscoveryServer

type ServerDiscoveryServer interface {
	GetSuggestedLobbyServer(context.Context, *ServerRequest) (*LobbyServer, error)
	GetSuggestedOtpServer(context.Context, *emptypb.Empty) (*ConnectableServer, error)
	GetSuggestedTowerDefenceServer(context.Context, *TowerDefenceServerRequest) (*ConnectableServer, error)
	// contains filtered or unexported methods
}

ServerDiscoveryServer is the server API for ServerDiscovery service. All implementations must embed UnimplementedServerDiscoveryServer for forward compatibility

type ServerRequest

type ServerRequest struct {
	PlayerCount      int64 `protobuf:"varint,1,opt,name=player_count,json=playerCount,proto3" json:"player_count,omitempty"`
	EnsureSameServer *bool `protobuf:"varint,2,opt,name=ensure_same_server,json=ensureSameServer,proto3,oneof" json:"ensure_same_server,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerRequest) Descriptor deprecated

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

Deprecated: Use ServerRequest.ProtoReflect.Descriptor instead.

func (*ServerRequest) GetEnsureSameServer

func (x *ServerRequest) GetEnsureSameServer() bool

func (*ServerRequest) GetPlayerCount

func (x *ServerRequest) GetPlayerCount() int64

func (*ServerRequest) ProtoMessage

func (*ServerRequest) ProtoMessage()

func (*ServerRequest) ProtoReflect

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

func (*ServerRequest) Reset

func (x *ServerRequest) Reset()

func (*ServerRequest) String

func (x *ServerRequest) String() string

type TowerDefenceServerRequest

type TowerDefenceServerRequest struct {
	PlayerCount int64 `protobuf:"varint,1,opt,name=player_count,json=playerCount,proto3" json:"player_count,omitempty"`
	InProgress  bool  `protobuf:"varint,2,opt,name=in_progress,json=inProgress,proto3" json:"in_progress,omitempty"`
	// contains filtered or unexported fields
}

func (*TowerDefenceServerRequest) Descriptor deprecated

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

Deprecated: Use TowerDefenceServerRequest.ProtoReflect.Descriptor instead.

func (*TowerDefenceServerRequest) GetInProgress

func (x *TowerDefenceServerRequest) GetInProgress() bool

func (*TowerDefenceServerRequest) GetPlayerCount

func (x *TowerDefenceServerRequest) GetPlayerCount() int64

func (*TowerDefenceServerRequest) ProtoMessage

func (*TowerDefenceServerRequest) ProtoMessage()

func (*TowerDefenceServerRequest) ProtoReflect

func (*TowerDefenceServerRequest) Reset

func (x *TowerDefenceServerRequest) Reset()

func (*TowerDefenceServerRequest) String

func (x *TowerDefenceServerRequest) String() string

type UnimplementedServerDiscoveryServer

type UnimplementedServerDiscoveryServer struct {
}

UnimplementedServerDiscoveryServer must be embedded to have forward compatible implementations.

func (UnimplementedServerDiscoveryServer) GetSuggestedLobbyServer

func (UnimplementedServerDiscoveryServer) GetSuggestedOtpServer

func (UnimplementedServerDiscoveryServer) GetSuggestedTowerDefenceServer

type UnsafeServerDiscoveryServer

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

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

Jump to

Keyboard shortcuts

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