Documentation ¶
Index ¶
- Variables
- func PlayerToProto(p proxy.Player) *pb.Player
- func PlayersToProto(p []proxy.Player) []*pb.Player
- func ServerToProto(s proxy.RegisteredServer) *pb.Server
- func ServersToProto(s []proxy.RegisteredServer) []*pb.Server
- type Config
- type Handler
- type Server
- type Service
- func (s *Service) ConnectPlayer(ctx context.Context, c *connect.Request[pb.ConnectPlayerRequest]) (*connect.Response[pb.ConnectPlayerResponse], error)
- func (s *Service) DisconnectPlayer(ctx context.Context, c *connect.Request[pb.DisconnectPlayerRequest]) (*connect.Response[pb.DisconnectPlayerResponse], error)
- func (s *Service) GetPlayer(ctx context.Context, c *connect.Request[pb.GetPlayerRequest]) (*connect.Response[pb.GetPlayerResponse], error)
- func (s *Service) ListPlayers(ctx context.Context, c *connect.Request[pb.ListPlayersRequest]) (*connect.Response[pb.ListPlayersResponse], error)
- func (s *Service) ListServers(ctx context.Context, c *connect.Request[pb.ListServersRequest]) (*connect.Response[pb.ListServersResponse], error)
- func (s *Service) RegisterServer(ctx context.Context, c *connect.Request[pb.RegisterServerRequest]) (*connect.Response[pb.RegisterServerResponse], error)
- func (s *Service) UnregisterServer(ctx context.Context, c *connect.Request[pb.UnregisterServerRequest]) (*connect.Response[pb.UnregisterServerResponse], error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{
Bind: "localhost:8080",
}
DefaultConfig is the default configuration for the Config.
Functions ¶
func ServerToProto ¶
func ServerToProto(s proxy.RegisteredServer) *pb.Server
func ServersToProto ¶
func ServersToProto(s []proxy.RegisteredServer) []*pb.Server
Types ¶
type Config ¶
type Config struct { // Bind is the address to bind the API server to. // Using a localhost address is recommended to avoid exposing the API to the public. Bind string `json:"bind,omitempty" yaml:"bind,omitempty"` }
Config is the configuration for the Gate API.
type Handler ¶
type Handler = gatev1connect.GateServiceHandler
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) ConnectPlayer ¶
func (*Service) DisconnectPlayer ¶
func (*Service) ListPlayers ¶
func (*Service) ListServers ¶
func (*Service) RegisterServer ¶
func (*Service) UnregisterServer ¶
Click to show internal directories.
Click to hide internal directories.