metadata

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

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

type Events

type Events []Event

type Mainte

type Mainte struct {
	Client *ec2metadata.EC2Metadata
}

func (*Mainte) GetEvents

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

Get Scheduled Maintenances

func (*Mainte) GetInstanceId

func (mm *Mainte) GetInstanceId(ctx context.Context) (string, error)

Get Instance ID from http://169.254.169.254/latest/meta-data/instance-id

type MetaMainteTime

type MetaMainteTime time.Time

func (MetaMainteTime) MarshalJSON

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

func (*MetaMainteTime) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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