gamelift

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGameLiftResponse

func ParseGameLiftResponse(data []interface{}) error

Types

type Client

type Client interface {
	Handle(h Handler)

	Open() error
	ProcessReady(event *pbuffer.ProcessReady) error
	ProcessEnding(event *pbuffer.ProcessEnding) error
	ActivateGameSession(event *pbuffer.GameSessionActivate) error
	TerminateGameSession(event *pbuffer.GameSessionTerminate) error
	StartMatchBackfill(event *pbuffer.BackfillMatchmakingRequest) (*pbuffer.BackfillMatchmakingResponse, error)
	StopMatchBackfill(event *pbuffer.StopMatchmakingRequest) error
	UpdatePlayerSessionCreationPolicy(event *pbuffer.UpdatePlayerSessionCreationPolicy) error
	AcceptPlayerSession(event *pbuffer.AcceptPlayerSession) error
	RemovePlayerSession(event *pbuffer.RemovePlayerSession) error
	DescribePlayerSessions(event *pbuffer.DescribePlayerSessionsRequest) (*pbuffer.DescribePlayerSessionsResponse, error)

	GetGameSessionId() *string
	GetTerminationTime() *time.Time
}

func NewClient

func NewClient(logger *logrus.Logger, config Config) Client

type Config

type Config struct {
	Domain string
	Port   int
}

type GenericError

type GenericError struct {
	pbuffer.GameLiftResponse
}

func (*GenericError) Error

func (err *GenericError) Error() string

type Handler

type Handler interface {
	StartGameSession(event *pbuffer.ActivateGameSession)
	UpdateGameSession(event *pbuffer.UpdateGameSession)
	ProcessTerminate(event *pbuffer.TerminateProcess)
	HealthCheck() bool
}

Jump to

Keyboard shortcuts

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