Git Product home page Git Product logo

fleet-client-go's Introduction

fleet-client-go

Godoc

Currently that client requires a fleetctl binary available to execute. Thus there is no ssh connection used, the possible commands are submit, start, stop, destroy, list-units, list-machines. The client supports a dump version of Status, that uses list-units and just parses whether a service is running or not.

A new way to use fleets http api has been implemented.

install

import fleetClientPkg "github.com/DimShadoWWW/fleet-client-go"

usage

// Create new fleet client based on a given binary.
fleetClient := fleetClientPkg.NewClientCLI()

// Create new fleet client based on the http api.
fleetClient := fleetClientPkg.NewClientAPI()

// Interface methods.
type FleetClient interface {
  // A Unit is a submitted job known by fleet, but not started yet. Submitting
  // a job creates a unit. Unit() returns such an object. Further a Unit has
  // different properties than a ScheduledUnit.
	Unit(name string) (*job.Unit, error)

  // A ScheduledUnit is a submitted job known by fleet in a specific state.
  // ScheduledUnit() does not fetch a ScheduledUnit if a Unit is not started
  // yet, but only submitted. Further a ScheduledUnit has different properties
  // than a Unit.
	ScheduledUnit(name string) (*job.ScheduledUnit, error)

	Submit(name, filePath string) error
	Start(name string) error
	Stop(name string) error
	Load(name string) error
	Destroy(name string) error
	Status(name string) (*Status, error) // Deprecated, use StatusUnit()
	StatusUnit(name string) (UnitStatus, error)
}

fleet-client-go's People

Contributors

dimshadowww avatar jaehue avatar patrickbcullen avatar teemow avatar zeisss avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.