Documentation
¶
Overview ¶
Package sdkserver implements SDK server (sidecar). this package reused some codes of agones sdk-server
Package sdkserver implements SDK server (sidecar).
Index ¶
- type SDKServer
- func (s *SDKServer) GetGameServer(context.Context, *sdkapi.Empty) (*sdkapi.GameServer, error)
- func (s *SDKServer) Run(stop <-chan struct{})
- func (s *SDKServer) SetAnnotation(_ context.Context, kv *sdkapi.KeyValue) (*sdkapi.Empty, error)
- func (s *SDKServer) SetCondition(_ context.Context, kv *sdkapi.KeyValue) (*sdkapi.Empty, error)
- func (s *SDKServer) SetLabel(_ context.Context, kv *sdkapi.KeyValue) (*sdkapi.Empty, error)
- func (s *SDKServer) WatchGameServer(_ *sdkapi.Empty, stream sdkapi.SDK_WatchGameServerServer) error
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 ¶
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 ¶
SetAnnotation adds the Key/Value to be used to set the annotations with the metadataPrefix to the `GameServer` metdata
func (*SDKServer) SetCondition ¶
SetCondition adds the Key/Value to be used to set the condition to GameServer status
func (*SDKServer) SetLabel ¶
SetLabel adds the Key/Value to be used to set the label with the metadataPrefix to the `GameServer` metdata
func (*SDKServer) WatchGameServer ¶
WatchGameServer sends events through the stream when changes occur to the backing GameServer configuration / status