pkg

package
v0.0.0-...-ee8cbac Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackfillConnectionKey     = "game.kruise.io/connection"
	BackfillConnectedTag      = "game.kruise.io/connected"
	OpenMatchLabelSelectorKey = "game.kruise.io/owner-gss"
	AssignmentGsNameKey       = "game.kruise.io/gs-name"
	GameServerMatchIdKey      = "gs-sync/match-id"
	GameNameProfileKey        = "game_name"
	ClusterHostName           = "Host"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

type Allocator struct {
	GameServerListers map[string]v1alpha1Lister.GameServerLister
	GameServerClients map[string]v1alpha1client.Interface

	BackendClient  pb.BackendServiceClient
	BackendConn    *grpc.ClientConn
	FrontendClient pb.FrontendServiceClient
	FrontendConn   *grpc.ClientConn

	MatchFunctionEndpoint string
	MatchFunctionPort     int32

	GameServerLabelSelector string
	ProfileName             string
	GameServerSetNames      string
	ClusterNames            []string

	//GameServersReSyncInterval time.Duration
	MatchPullingInterval time.Duration
	// contains filtered or unexported fields
}

func NewAllocator

func NewAllocator(options *Options) (allocator *Allocator, err error)

func (*Allocator) Run

func (a *Allocator) Run(loopStopCh <-chan struct{}, loopDoneCh chan<- struct{})

type ConnectInfo

type ConnectInfo struct {
	// contains filtered or unexported fields
}

type Options

type Options struct {
	MatchFunctionEndpoint     string
	MatchFunctionPort         int
	BackendEndpoint           string
	BackendPort               int
	FrontendEndpoint          string
	FrontendPort              int
	Config                    *rest.Config
	GameServerLabelSelector   string
	GameServersReSyncInterval time.Duration
	MatchPullingInterval      time.Duration
	ProfileName               string
	SlaveClustersNames        string
	Namespace                 string
	GameServerSetNames        string
}

func (*Options) GetBackendConn

func (o *Options) GetBackendConn() (string, error)

GetBackendConn return backend conn of open-match service

func (*Options) GetFrontendConn

func (o *Options) GetFrontendConn() (string, error)

GetFrontendConn return backend conn of open-match service

Jump to

Keyboard shortcuts

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