Documentation ¶
Index ¶
- func Handle(ctx context.Context, evt Event) (bool, error)
- func Running()
- type ChangeRecordInput
- type Config
- type Database
- type Event
- type EventDetail
- type Handler
- func (h *Handler) Attach(instance *ec2.Instance) error
- func (h *Handler) AttachAddress(instance *ec2.Instance, tagName, tagValue string) error
- func (h *Handler) AttachRecord(instance *ec2.Instance, tagName, tagValue string) error
- func (h *Handler) AttachVolume(instance *ec2.Instance, tagName, tagValue string) error
- func (h *Handler) Detach(instance *ec2.Instance) error
- func (h *Handler) Remove(id string) error
- func (h *Handler) Retrieve(id string) (*ec2.Instance, error)
- func (h *Handler) Running() error
- func (h *Handler) Store(instance *ec2.Instance) error
- func (h *Handler) Terminated() error
- func (h *Handler) Wait(id string) (*ec2.Instance, error)
- type InstanceDatabase
- type InstanceService
- func (s *InstanceService) AttachAddress(instance *ec2.Instance, address *ec2.Address) error
- func (s *InstanceService) AttachRecord(id, tagName, tagValue string) error
- func (s *InstanceService) AttachVolume(instance *ec2.Instance, volume *ec2.Volume) error
- func (s *InstanceService) ChangeRecord(change *ChangeRecordInput) error
- func (s *InstanceService) FindAddress(id, tagName, tagValue string) (*ec2.Address, error)
- func (s *InstanceService) FindVolume(id, tagName, tagValue string) (*ec2.Volume, error)
- func (s *InstanceService) GetInstance(id string) (*ec2.Instance, error)
- func (s *InstanceService) GetInstanceZone(id string) (string, error)
- func (s *InstanceService) GetTags(raw []*ec2.Tag) map[string]string
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangeRecordInput ¶
type EventDetail ¶
type Handler ¶
type Handler struct { Poll time.Duration Max time.Duration // contains filtered or unexported fields }
func NewHandler ¶
func (*Handler) AttachAddress ¶
func (*Handler) AttachRecord ¶
func (*Handler) AttachVolume ¶
func (*Handler) Terminated ¶
type InstanceDatabase ¶
type InstanceDatabase struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func NewDatabase(table string) *InstanceDatabase
func (*InstanceDatabase) Remove ¶
func (d *InstanceDatabase) Remove(id string) error
type InstanceService ¶
type InstanceService struct { Region string // contains filtered or unexported fields }
func NewService ¶
func NewService(region string) *InstanceService
func (*InstanceService) AttachAddress ¶
func (*InstanceService) AttachRecord ¶
func (s *InstanceService) AttachRecord(id, tagName, tagValue string) error
func (*InstanceService) AttachVolume ¶
func (*InstanceService) ChangeRecord ¶
func (s *InstanceService) ChangeRecord(change *ChangeRecordInput) error
func (*InstanceService) FindAddress ¶
func (s *InstanceService) FindAddress(id, tagName, tagValue string) (*ec2.Address, error)
func (*InstanceService) FindVolume ¶
func (s *InstanceService) FindVolume(id, tagName, tagValue string) (*ec2.Volume, error)
func (*InstanceService) GetInstance ¶
func (s *InstanceService) GetInstance(id string) (*ec2.Instance, error)
func (*InstanceService) GetInstanceZone ¶
func (s *InstanceService) GetInstanceZone(id string) (string, error)
type Service ¶
type Service interface { GetInstance(id string) (*ec2.Instance, error) GetInstanceZone(id string) (string, error) GetTags([]*ec2.Tag) map[string]string FindVolume(id, tagName, tagValue string) (*ec2.Volume, error) FindAddress(id, tagName, tagValue string) (*ec2.Address, error) AttachVolume(*ec2.Instance, *ec2.Volume) error AttachAddress(*ec2.Instance, *ec2.Address) error AttachRecord(id, tagName, tagValue string) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.