Documentation ¶
Overview ¶
Package schema provides access to the Fleet API.
See http://github.com/coreos/fleet
Usage example:
import "github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/google-api-go-client/schema/v1-alpha" ... schemaService, err := schema.New(oauthHttpClient)
Index ¶
- func MapSchemaToMachineStates(entities []*Machine) []machine.MachineState
- func MapSchemaUnitOptionsToUnitFile(sopts []*UnitOption) *unit.UnitFile
- func MapSchemaUnitStatesToUnitStates(entities []*UnitState) []*unit.UnitState
- func MapSchemaUnitToScheduledUnit(entity *Unit) *job.ScheduledUnit
- func MapSchemaUnitToUnit(entity *Unit) *job.Unit
- func MapSchemaUnitsToScheduledUnits(entities []*Unit) []job.ScheduledUnit
- func MapSchemaUnitsToUnits(entities []*Unit) []job.Unit
- type Machine
- type MachinePage
- type MachinesListCall
- type MachinesService
- type Service
- type Unit
- type UnitOption
- type UnitPage
- type UnitState
- type UnitStateListCall
- type UnitStatePage
- type UnitStateService
- type UnitsDeleteCall
- type UnitsGetCall
- type UnitsListCall
- type UnitsService
- type UnitsSetCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapSchemaToMachineStates ¶ added in v0.7.0
func MapSchemaToMachineStates(entities []*Machine) []machine.MachineState
func MapSchemaUnitOptionsToUnitFile ¶ added in v0.7.0
func MapSchemaUnitOptionsToUnitFile(sopts []*UnitOption) *unit.UnitFile
func MapSchemaUnitStatesToUnitStates ¶ added in v0.7.0
func MapSchemaUnitToScheduledUnit ¶ added in v0.7.0
func MapSchemaUnitToScheduledUnit(entity *Unit) *job.ScheduledUnit
func MapSchemaUnitToUnit ¶ added in v0.7.0
func MapSchemaUnitsToScheduledUnits ¶ added in v0.7.0
func MapSchemaUnitsToScheduledUnits(entities []*Unit) []job.ScheduledUnit
func MapSchemaUnitsToUnits ¶ added in v0.7.0
Types ¶
type Machine ¶
type Machine struct { Id string `json:"id,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` PrimaryIP string `json:"primaryIP,omitempty"` }
func MapMachineStateToSchema ¶ added in v0.7.0
func MapMachineStateToSchema(ms *machine.MachineState) *Machine
type MachinePage ¶
type MachinesListCall ¶
type MachinesListCall struct {
// contains filtered or unexported fields
}
func (*MachinesListCall) Do ¶
func (c *MachinesListCall) Do() (*MachinePage, error)
func (*MachinesListCall) NextPageToken ¶
func (c *MachinesListCall) NextPageToken(nextPageToken string) *MachinesListCall
NextPageToken sets the optional parameter "nextPageToken":
type MachinesService ¶
type MachinesService struct {
// contains filtered or unexported fields
}
func NewMachinesService ¶
func NewMachinesService(s *Service) *MachinesService
func (*MachinesService) List ¶
func (r *MachinesService) List() *MachinesListCall
List: Retrieve a page of Machine objects.
type Service ¶
type Service struct { BasePath string // API endpoint base URL Machines *MachinesService UnitState *UnitStateService Units *UnitsService // contains filtered or unexported fields }
type Unit ¶
type Unit struct { CurrentState string `json:"currentState,omitempty"` DesiredState string `json:"desiredState,omitempty"` MachineID string `json:"machineID,omitempty"` Name string `json:"name,omitempty"` Options []*UnitOption `json:"options,omitempty"` }
func MapUnitToSchemaUnit ¶ added in v0.7.0
func MapUnitToSchemaUnit(u *job.Unit, su *job.ScheduledUnit) *Unit
type UnitOption ¶ added in v0.7.0
type UnitOption struct { Name string `json:"name,omitempty"` Section string `json:"section,omitempty"` Value string `json:"value,omitempty"` }
func MapUnitFileToSchemaUnitOptions ¶ added in v0.7.0
func MapUnitFileToSchemaUnitOptions(uf *unit.UnitFile) []*UnitOption
type UnitState ¶ added in v0.7.0
type UnitState struct { Hash string `json:"hash,omitempty"` MachineID string `json:"machineID,omitempty"` Name string `json:"name,omitempty"` SystemdActiveState string `json:"systemdActiveState,omitempty"` SystemdLoadState string `json:"systemdLoadState,omitempty"` SystemdSubState string `json:"systemdSubState,omitempty"` }
func MapUnitStateToSchemaUnitState ¶ added in v0.7.0
func MapUnitStatesToSchemaUnitStates ¶ added in v0.7.0
type UnitStateListCall ¶ added in v0.7.0
type UnitStateListCall struct {
// contains filtered or unexported fields
}
func (*UnitStateListCall) Do ¶ added in v0.7.0
func (c *UnitStateListCall) Do() (*UnitStatePage, error)
func (*UnitStateListCall) MachineID ¶ added in v0.7.0
func (c *UnitStateListCall) MachineID(machineID string) *UnitStateListCall
MachineID sets the optional parameter "machineID":
func (*UnitStateListCall) NextPageToken ¶ added in v0.7.0
func (c *UnitStateListCall) NextPageToken(nextPageToken string) *UnitStateListCall
NextPageToken sets the optional parameter "nextPageToken":
func (*UnitStateListCall) UnitName ¶ added in v0.7.0
func (c *UnitStateListCall) UnitName(unitName string) *UnitStateListCall
UnitName sets the optional parameter "unitName":
type UnitStatePage ¶ added in v0.7.0
type UnitStateService ¶ added in v0.7.0
type UnitStateService struct {
// contains filtered or unexported fields
}
func NewUnitStateService ¶ added in v0.7.0
func NewUnitStateService(s *Service) *UnitStateService
func (*UnitStateService) List ¶ added in v0.7.0
func (r *UnitStateService) List() *UnitStateListCall
List: Retrieve a page of UnitState objects.
type UnitsDeleteCall ¶
type UnitsDeleteCall struct {
// contains filtered or unexported fields
}
func (*UnitsDeleteCall) Do ¶
func (c *UnitsDeleteCall) Do() error
type UnitsGetCall ¶
type UnitsGetCall struct {
// contains filtered or unexported fields
}
func (*UnitsGetCall) Do ¶
func (c *UnitsGetCall) Do() (*Unit, error)
type UnitsListCall ¶
type UnitsListCall struct {
// contains filtered or unexported fields
}
func (*UnitsListCall) Do ¶
func (c *UnitsListCall) Do() (*UnitPage, error)
func (*UnitsListCall) NextPageToken ¶
func (c *UnitsListCall) NextPageToken(nextPageToken string) *UnitsListCall
NextPageToken sets the optional parameter "nextPageToken":
type UnitsService ¶
type UnitsService struct {
// contains filtered or unexported fields
}
func NewUnitsService ¶
func NewUnitsService(s *Service) *UnitsService
func (*UnitsService) Delete ¶
func (r *UnitsService) Delete(unitName string) *UnitsDeleteCall
Delete: Delete the referenced Unit object.
func (*UnitsService) Get ¶
func (r *UnitsService) Get(unitName string) *UnitsGetCall
Get: Retrieve a single Unit object.
func (*UnitsService) List ¶
func (r *UnitsService) List() *UnitsListCall
List: Retrieve a page of Unit objects.
func (*UnitsService) Set ¶
func (r *UnitsService) Set(unitName string, unit *Unit) *UnitsSetCall
Set: Create or update a Unit.
type UnitsSetCall ¶
type UnitsSetCall struct {
// contains filtered or unexported fields
}
func (*UnitsSetCall) Do ¶
func (c *UnitsSetCall) Do() error
Click to show internal directories.
Click to hide internal directories.