Documentation ¶
Index ¶
- Constants
- func WithDualStack(with bool) ec2Option
- type CatalogAttributes
- type EC2API
- type HostPlugin
- func (p *HostPlugin) ListHosts(ctx context.Context, req *pb.ListHostsRequest) (*pb.ListHostsResponse, error)
- func (p *HostPlugin) NormalizeSetData(ctx context.Context, req *pb.NormalizeSetDataRequest) (*pb.NormalizeSetDataResponse, error)
- func (p *HostPlugin) OnCreateCatalog(ctx context.Context, req *pb.OnCreateCatalogRequest) (*pb.OnCreateCatalogResponse, error)
- func (p *HostPlugin) OnCreateSet(ctx context.Context, req *pb.OnCreateSetRequest) (*pb.OnCreateSetResponse, error)
- func (p *HostPlugin) OnDeleteCatalog(ctx context.Context, req *pb.OnDeleteCatalogRequest) (*pb.OnDeleteCatalogResponse, error)
- func (p *HostPlugin) OnDeleteSet(ctx context.Context, req *pb.OnDeleteSetRequest) (*pb.OnDeleteSetResponse, error)
- func (p *HostPlugin) OnUpdateCatalog(ctx context.Context, req *pb.OnUpdateCatalogRequest) (*pb.OnUpdateCatalogResponse, error)
- func (p *HostPlugin) OnUpdateSet(ctx context.Context, req *pb.OnUpdateSetRequest) (*pb.OnUpdateSetResponse, error)
- type SetAttributes
Constants ¶
const ( // ConstDescribeInstancesFilters is the key for the filter in the dynamic host set. ConstDescribeInstancesFilters = "filters" // ConstInstanceNameTagKey denotes the special AWS tag key that contains an EC2 // instance's name. This field is to be matched literally. ConstInstanceNameTagKey = "Name" // ConstAwsDualStack is the key for the dualstack flag in the aws s3 client. ConstAwsDualStack = "dual_stack" )
Variables ¶
This section is empty.
Functions ¶
func WithDualStack ¶ added in v0.4.1
func WithDualStack(with bool) ec2Option
WithDualStack sets the dual stack resolver
Types ¶
type CatalogAttributes ¶
type CatalogAttributes struct { *cred.CredentialAttributes // DualStack is used for configuring how the aws client will resolve requests. DualStack bool }
CatalogAttributes is a Go-native representation of the Attributes map.
type EC2API ¶ added in v0.1.7
type EC2API interface {
DescribeInstances(context.Context, *ec2.DescribeInstancesInput, ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error)
}
type HostPlugin ¶
type HostPlugin struct { pb.UnimplementedHostPluginServiceServer // contains filtered or unexported fields }
HostPlugin implements the HostPluginServiceServer interface for the AWS host service plugin.
func (*HostPlugin) ListHosts ¶
func (p *HostPlugin) ListHosts(ctx context.Context, req *pb.ListHostsRequest) (*pb.ListHostsResponse, error)
ListHosts returns the list of ec2 hosts and their descriptions.
func (*HostPlugin) NormalizeSetData ¶
func (p *HostPlugin) NormalizeSetData(ctx context.Context, req *pb.NormalizeSetDataRequest) (*pb.NormalizeSetDataResponse, error)
NormalizeSetData currently ensures that "filters" is an array value, even though it's accepted as a string value for CLI UX reasons
func (*HostPlugin) OnCreateCatalog ¶
func (p *HostPlugin) OnCreateCatalog(ctx context.Context, req *pb.OnCreateCatalogRequest) (*pb.OnCreateCatalogResponse, error)
OnCreateCatalog is called when a dynamic host catalog is created.
func (*HostPlugin) OnCreateSet ¶
func (p *HostPlugin) OnCreateSet(ctx context.Context, req *pb.OnCreateSetRequest) (*pb.OnCreateSetResponse, error)
OnCreateSet is called when a dynamic host set is created.
func (*HostPlugin) OnDeleteCatalog ¶
func (p *HostPlugin) OnDeleteCatalog(ctx context.Context, req *pb.OnDeleteCatalogRequest) (*pb.OnDeleteCatalogResponse, error)
OnDeleteCatalog is called when a dynamic host catalog is deleted.
func (*HostPlugin) OnDeleteSet ¶
func (p *HostPlugin) OnDeleteSet(ctx context.Context, req *pb.OnDeleteSetRequest) (*pb.OnDeleteSetResponse, error)
OnDeleteSet is called when a dynamic host set is deleted.
func (*HostPlugin) OnUpdateCatalog ¶
func (p *HostPlugin) OnUpdateCatalog(ctx context.Context, req *pb.OnUpdateCatalogRequest) (*pb.OnUpdateCatalogResponse, error)
OnUpdateCatalog is called when a dynamic host catalog is updated.
func (*HostPlugin) OnUpdateSet ¶
func (p *HostPlugin) OnUpdateSet(ctx context.Context, req *pb.OnUpdateSetRequest) (*pb.OnUpdateSetResponse, error)
OnUpdateSet is called when a dynamic host set is updated.
type SetAttributes ¶
type SetAttributes struct {
Filters []string
}
SetAttributes is a Go-native representation of the Attributes map that can be used for decoding the incoming map via mapstructure.