kubeclient

package module
v0.0.0-...-88729a4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2016 License: GPL-3.0 Imports: 9 Imported by: 4

README

kubeclient

communicates with the kubenetes apiserver to start jobs, bots, and gametype builds

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DesiredPodState

type DesiredPodState func(*api.Pod) bool

type KubeClient

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

func NewClient

func NewClient() (*KubeClient, error)

NewClient returns a client that can communicate to the apiserver to start jobs. IMPORTANT: Creating a client with this function only work if running from inside kubernetes cluster! @returns valid client if successful, error otherwise

func (*KubeClient) BuildGameType

func (kc *KubeClient) BuildGameType(gameType *models.GameType) (*api.Pod, error)

BuildGameType kicks off a gametype build @returns error if client fails to start the gametype builder pod

func (*KubeClient) StartBot

func (kc *KubeClient) StartBot(ip string, botID int32, proj *models.Project, game *models.Game) (*api.Pod, error)

StarBot starts a bot, which runs a users code in the container built for their language @returns error if client fails to start the bot pod

func (*KubeClient) StartGame

func (kc *KubeClient) StartGame(game *models.Game) (*api.Pod, error)

StartGame starts a game, requires a game and the projects associated with the game @returns error if client fails to start the game runner pod

func (*KubeClient) WatchToCompletion

func (kc *KubeClient) WatchToCompletion(pod *api.Pod) (*api.Pod, error)

func (*KubeClient) WatchToStartup

func (kc *KubeClient) WatchToStartup(pod *api.Pod) (*api.Pod, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳