sdkserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package sdkserver implements SDK server (sidecar). this package reused some codes of agones sdk-server

Package sdkserver implements SDK server (sidecar).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SDKServer

type SDKServer struct {
	sdkapi.UnimplementedSDKServer
	// contains filtered or unexported fields
}

SDKServer is a gRPC server, that is meant to be a sidecar for a GameServer that will update the game server status on SDK requests

func NewSDKServer

func NewSDKServer(gameServerName, namespace string, kubeClient kubernetes.Interface, carrierClient versioned.Interface,
	lister listerv1.GameServerLister, sendCh chan *sdkapi.GameServer) (*SDKServer, error)

NewSDKServer creates a SDKServer that sets up an InClusterConfig for Kubernetes

func (*SDKServer) GetGameServer

func (s *SDKServer) GetGameServer(context.Context, *sdkapi.Empty) (*sdkapi.GameServer, error)

GetGameServer returns the current GameServer configuration and state from the backing GameServer CRD

func (*SDKServer) Run

func (s *SDKServer) Run(stop <-chan struct{})

Run processes the rate limited queue. Will block until stop is closed

func (*SDKServer) SetAnnotation

func (s *SDKServer) SetAnnotation(_ context.Context, kv *sdkapi.KeyValue) (*sdkapi.Empty, error)

SetAnnotation adds the Key/Value to be used to set the annotations with the metadataPrefix to the `GameServer` metdata

func (*SDKServer) SetCondition

func (s *SDKServer) SetCondition(_ context.Context, kv *sdkapi.KeyValue) (*sdkapi.Empty, error)

SetCondition adds the Key/Value to be used to set the condition to GameServer status

func (*SDKServer) SetLabel

func (s *SDKServer) SetLabel(_ context.Context, kv *sdkapi.KeyValue) (*sdkapi.Empty, error)

SetLabel adds the Key/Value to be used to set the label with the metadataPrefix to the `GameServer` metdata

func (*SDKServer) WatchGameServer

func (s *SDKServer) WatchGameServer(_ *sdkapi.Empty, stream sdkapi.SDK_WatchGameServerServer) error

WatchGameServer sends events through the stream when changes occur to the backing GameServer configuration / status

Jump to

Keyboard shortcuts

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