metadata

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MetaMainteTimeLayout = "2 Jan 2006 15:04:05 MST"

MetaMainteTimeLayout ...

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Code        ec2.EventCode  `json:"Code"`
	NotBefore   MetaMainteTime `json:"NotBefore"`
	NotAfter    MetaMainteTime `json:"NotAfter"`
	Description string         `json:"Description"`
	State       string         `json:"State"`
}

Event ...

type Events

type Events []Event

Events ...

type Mainte

type Mainte struct {
	Client *ec2metadata.Client
}

Mainte ...

func (*Mainte) Fetch added in v0.2.0

func (mm *Mainte) Fetch(ctx context.Context) (evs events.Events, err error)

Fetch ... Get Scheduled Maintenances

func (*Mainte) FetchSpotEvent added in v0.2.1

func (mm *Mainte) FetchSpotEvent(ctx context.Context) (sev SpotEvent, err error)

FetchSpotEvent ...

type MetaMainteTime

type MetaMainteTime time.Time

MetaMainteTime ...

func (MetaMainteTime) MarshalJSON

func (ct MetaMainteTime) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (*MetaMainteTime) UnmarshalJSON

func (ct *MetaMainteTime) UnmarshalJSON(b []byte) error

UnmarshalJSON ...

type SpotEvent added in v0.2.1

type SpotEvent struct {
	Action SpotEventAction `json:"action"`
	Time   time.Time       `json:"time"`
}

SpotEvent ...

type SpotEventAction added in v0.2.1

type SpotEventAction string

SpotEventAction ...

const (
	SpotEventActionHibernate SpotEventAction = "hibernate"
	SpotEventActionStop      SpotEventAction = "stop"
	SpotEventActionTerminate SpotEventAction = "terminate"
)

SpotEventAction ...

Jump to

Keyboard shortcuts

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