Documentation
¶
Index ¶
- Constants
- Variables
- type ClusterConfig
- type CreateDomainInput
- type CrossClusterDomainInfo
- type DNSRegistrar
- type Domain
- type EBSOptions
- type EngineConfig
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handle(c *echo.Context) error
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type InMemoryBackend
- func (b *InMemoryBackend) AcceptInboundCrossClusterSearchConnection(ctx context.Context, connectionID string) (*InboundConnection, error)
- func (b *InMemoryBackend) AddDomainInternal(ctx context.Context, d Domain)
- func (b *InMemoryBackend) AddInboundConnectionInternal(ctx context.Context, conn InboundConnection)
- func (b *InMemoryBackend) AddTags(ctx context.Context, domainARN string, kv map[string]string) error
- func (b *InMemoryBackend) AssociatePackage(ctx context.Context, packageID, domainName string) error
- func (b *InMemoryBackend) AuthorizeVpcEndpointAccess(ctx context.Context, domainName, account string) error
- func (b *InMemoryBackend) CancelDomainConfigChange(ctx context.Context, domainName string) (*Domain, error)
- func (b *InMemoryBackend) CancelElasticsearchServiceSoftwareUpdate(ctx context.Context, domainName string) (*Domain, error)
- func (b *InMemoryBackend) CreateDomain(ctx context.Context, inp CreateDomainInput) (*Domain, error)
- func (b *InMemoryBackend) CreateOutboundCrossClusterSearchConnection(ctx context.Context, localDomain, remoteDomain CrossClusterDomainInfo, ...) (*OutboundConnection, error)
- func (b *InMemoryBackend) CreatePackage(ctx context.Context, name, packageType, description string) (*Package, error)
- func (b *InMemoryBackend) CreateVpcEndpoint(ctx context.Context, domainARN string, vpcOptions map[string]string) (*VpcEndpoint, error)
- func (b *InMemoryBackend) DeleteDomain(ctx context.Context, name string) (*Domain, error)
- func (b *InMemoryBackend) DeleteElasticsearchServiceRole() error
- func (b *InMemoryBackend) DeleteInboundCrossClusterSearchConnection(ctx context.Context, connectionID string) (*InboundConnection, error)
- func (b *InMemoryBackend) DeleteOutboundCrossClusterSearchConnection(ctx context.Context, connectionID string) (*OutboundConnection, error)
- func (b *InMemoryBackend) DeletePackage(ctx context.Context, packageID string) (*Package, error)
- func (b *InMemoryBackend) DeleteVpcEndpoint(ctx context.Context, vpcEndpointID string) (*VpcEndpoint, error)
- func (b *InMemoryBackend) DescribeDomain(ctx context.Context, name string) (*Domain, error)
- func (b *InMemoryBackend) DescribeDomainAutoTunes(ctx context.Context, domainName string) error
- func (b *InMemoryBackend) DescribeDomainChangeProgress(ctx context.Context, domainName string) error
- func (b *InMemoryBackend) DescribeInboundCrossClusterSearchConnections(ctx context.Context) []*InboundConnection
- func (b *InMemoryBackend) DescribeOutboundCrossClusterSearchConnections(ctx context.Context) []*OutboundConnection
- func (b *InMemoryBackend) DescribePackages(ctx context.Context, packageIDs []string) []*Package
- func (b *InMemoryBackend) DescribeReservedElasticsearchInstanceOfferings() []ReservedInstanceOffering
- func (b *InMemoryBackend) DescribeReservedElasticsearchInstances(ctx context.Context) []ReservedInstance
- func (b *InMemoryBackend) DescribeVpcEndpoints(ctx context.Context, vpcEndpointIDs []string) []*VpcEndpoint
- func (b *InMemoryBackend) DissociatePackage(ctx context.Context, packageID, domainName string) error
- func (b *InMemoryBackend) GetPackageVersionHistory(ctx context.Context, packageID string) ([]*Package, error)
- func (b *InMemoryBackend) GetUpgradeHistory(ctx context.Context, domainName string) error
- func (b *InMemoryBackend) GetUpgradeStatus(ctx context.Context, domainName string) error
- func (b *InMemoryBackend) ListDomainNames(ctx context.Context) []string
- func (b *InMemoryBackend) ListDomainsForPackage(ctx context.Context, packageID string) ([]string, error)
- func (b *InMemoryBackend) ListPackagesForDomain(ctx context.Context, domainName string) []*Package
- func (b *InMemoryBackend) ListTags(ctx context.Context, domainARN string) (map[string]string, error)
- func (b *InMemoryBackend) ListVpcEndpointAccess(ctx context.Context, domainName string) ([]string, error)
- func (b *InMemoryBackend) ListVpcEndpoints(ctx context.Context) []*VpcEndpoint
- func (b *InMemoryBackend) ListVpcEndpointsForDomain(ctx context.Context, domainName string) []*VpcEndpoint
- func (b *InMemoryBackend) PurchaseReservedElasticsearchInstanceOffering(ctx context.Context, offeringID, name string, count int) (*ReservedInstance, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RejectInboundCrossClusterSearchConnection(ctx context.Context, connectionID string) (*InboundConnection, error)
- func (b *InMemoryBackend) RemoveTags(ctx context.Context, domainARN string, keys []string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RevokeVpcEndpointAccess(ctx context.Context, domainName, account string) error
- func (b *InMemoryBackend) SetDNSRegistrar(dns DNSRegistrar)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartElasticsearchServiceSoftwareUpdate(ctx context.Context, domainName string) (*Domain, error)
- func (b *InMemoryBackend) UpdateDomainConfig(ctx context.Context, name string, cfg UpdateConfig) (*Domain, error)
- func (b *InMemoryBackend) UpdatePackage(ctx context.Context, packageID, description string) (*Package, error)
- func (b *InMemoryBackend) UpdateVpcEndpoint(ctx context.Context, vpcEndpointID string, vpcOptions map[string]string) (*VpcEndpoint, error)
- func (b *InMemoryBackend) UpgradeElasticsearchDomain(ctx context.Context, domainName, targetVersion string) (*Domain, error)
- type InboundConnection
- type OutboundConnection
- type Package
- type Provider
- type ReservedInstance
- type ReservedInstanceOffering
- type SnapshotOptions
- type UpdateConfig
- type VpcEndpoint
- type ZoneAwarenessConfig
Constants ¶
const ( EngineStub = "stub" EngineDocker = "docker" )
Engine mode constants.
Variables ¶
var ( ErrDomainNotFound = errors.New("ResourceNotFoundException") ErrDomainAlreadyExists = errors.New("ResourceAlreadyExistsException") // ErrValidation is returned for invalid or missing input parameters. ErrValidation = errors.New("ValidationException") // ErrInvalidParameter is an alias for ErrValidation kept for compatibility. ErrInvalidParameter = ErrValidation ErrConnectionNotFound = errors.New("ResourceNotFoundException") ErrPackageNotFound = errors.New("ResourceNotFoundException") ErrVpcEndpointNotFound = errors.New("ResourceNotFoundException") // ErrPackageAlreadyAssociated is returned when AssociatePackage targets a // (package, domain) pair that is already associated. AWS returns ConflictException. ErrPackageAlreadyAssociated = errors.New("ConflictException") )
Errors returned by the Elasticsearch backend.
var ErrNilAppContext = errors.New("AppContext is required")
ErrNilAppContext is returned by Init when appCtx is nil.
Functions ¶
This section is empty.
Types ¶
type ClusterConfig ¶
type ClusterConfig struct {
InstanceType string `json:"instanceType"`
DedicatedMasterType string `json:"dedicatedMasterType,omitempty"`
WarmType string `json:"warmType,omitempty"`
ZoneAwarenessConfig ZoneAwarenessConfig `json:"zoneAwarenessConfig"`
InstanceCount int `json:"instanceCount"`
DedicatedMasterCount int `json:"dedicatedMasterCount,omitempty"`
WarmCount int `json:"warmCount,omitempty"`
DedicatedMasterEnabled bool `json:"dedicatedMasterEnabled"`
ZoneAwarenessEnabled bool `json:"zoneAwarenessEnabled"`
WarmEnabled bool `json:"warmEnabled"`
ColdStorageEnabled bool `json:"coldStorageEnabled"`
}
ClusterConfig represents the cluster configuration for an Elasticsearch domain.
type CreateDomainInput ¶
type CreateDomainInput struct {
AdvancedOptions map[string]string
Name string
ElasticsearchVersion string
AccessPolicies string
TLSSecurityPolicy string
EBSOptions EBSOptions
ClusterConfig ClusterConfig
SnapshotOptions SnapshotOptions
EncryptionAtRestEnabled bool
NodeToNodeEncryptionEnabled bool
EnforceHTTPS bool
}
CreateDomainInput holds all parameters for CreateDomain.
type CrossClusterDomainInfo ¶
type CrossClusterDomainInfo struct {
OwnerID string `json:"OwnerId"`
DomainName string `json:"DomainName"`
Region string `json:"Region"`
}
CrossClusterDomainInfo holds domain endpoint info used in cross-cluster connections.
type DNSRegistrar ¶
DNSRegistrar can register and deregister hostnames with an embedded DNS server.
type Domain ¶
type Domain struct {
Tags *tags.Tags `json:"tags,omitempty"`
AdvancedOptions map[string]string `json:"advancedOptions,omitempty"`
Status string `json:"status"`
AccessPolicies string `json:"accessPolicies,omitempty"`
DomainID string `json:"domainID"`
ARN string `json:"arn"`
ElasticsearchVersion string `json:"elasticsearchVersion"`
Endpoint string `json:"endpoint"`
Name string `json:"name"`
TLSSecurityPolicy string `json:"tlsSecurityPolicy,omitempty"`
EBSOptions EBSOptions `json:"ebsOptions"`
ClusterConfig ClusterConfig `json:"clusterConfig"`
SnapshotOptions SnapshotOptions `json:"snapshotOptions"`
EncryptionAtRestEnabled bool `json:"encryptionAtRestEnabled"`
NodeToNodeEncryptionEnabled bool `json:"nodeToNodeEncryptionEnabled"`
EnforceHTTPS bool `json:"enforceHTTPS"`
// contains filtered or unexported fields
}
Domain represents an Elasticsearch domain.
type EBSOptions ¶
type EBSOptions struct {
VolumeType string `json:"volumeType"`
VolumeSize int `json:"volumeSize"`
Iops int `json:"iops"`
Throughput int `json:"throughput"`
EBSEnabled bool `json:"ebsEnabled"`
}
EBSOptions represents the EBS storage options for an Elasticsearch domain.
type EngineConfig ¶
type EngineConfig interface {
GetElasticsearchEngine() string
}
EngineConfig is the interface for accessing the Elasticsearch engine mode configuration.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
AccountID string
Region string
// contains filtered or unexported fields
}
Handler is the HTTP handler for Elasticsearch operations.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a new Elasticsearch Handler.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this Elasticsearch instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation returns the operation name from a request.
func (*Handler) ExtractResource ¶
ExtractResource returns the domain name from the request path.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo HandlerFunc for this service.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset implements service.Resettable by delegating to the backend.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a matcher that selects Elasticsearch requests by path prefix.
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler for the Elasticsearch service.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is the in-memory store for Elasticsearch domains.
Elasticsearch resources are region-scoped in AWS. Phase 3.3 of the datalayer refactor replaces the resource collections that used to be nested by region (outer key = region, e.g. map[string]map[string]*Domain) with a flat *store.Table, keyed by the composite "region|id" string (see regionKey), with a companion *store.Index grouping entries by region for the per-region scans the nested maps used to answer directly -- the same region-qualified-table pattern services/emr and services/codeartifact use. None of Domain/Package/InboundConnection/OutboundConnection/VpcEndpoint/ ReservedInstance carried a region field of their own before this conversion, so each gained an unexported region field purely for this composite key; persistence.go carries it through via a shared regionalDTO wrapper (store.Table.Snapshot's plain json.Marshal cannot see unexported fields).
arnIndex, packagesByName, packageAssociations, and vpcAccess are deliberately NOT converted: store.Table requires a *V value with its own identity, but each entry in these four maps is a bare string or string slice with no identifier of its own. They remain plain region-nested maps, unchanged by this refactor.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new InMemoryBackend.
func (*InMemoryBackend) AcceptInboundCrossClusterSearchConnection ¶
func (b *InMemoryBackend) AcceptInboundCrossClusterSearchConnection( ctx context.Context, connectionID string, ) (*InboundConnection, error)
AcceptInboundCrossClusterSearchConnection accepts a pending inbound cross-cluster search connection.
func (*InMemoryBackend) AddDomainInternal ¶
func (b *InMemoryBackend) AddDomainInternal(ctx context.Context, d Domain)
AddDomainInternal seeds a domain directly into the backend for testing. Tags are initialised fresh for the seeded domain.
func (*InMemoryBackend) AddInboundConnectionInternal ¶
func (b *InMemoryBackend) AddInboundConnectionInternal(ctx context.Context, conn InboundConnection)
AddInboundConnectionInternal seeds an inbound connection for testing.
func (*InMemoryBackend) AddTags ¶
func (b *InMemoryBackend) AddTags(ctx context.Context, domainARN string, kv map[string]string) error
AddTags adds or updates tags on the domain identified by ARN.
func (*InMemoryBackend) AssociatePackage ¶
func (b *InMemoryBackend) AssociatePackage(ctx context.Context, packageID, domainName string) error
AssociatePackage associates an Elasticsearch package with a domain.
func (*InMemoryBackend) AuthorizeVpcEndpointAccess ¶
func (b *InMemoryBackend) AuthorizeVpcEndpointAccess(ctx context.Context, domainName, account string) error
AuthorizeVpcEndpointAccess grants an account or service access to the domain's VPC endpoint.
func (*InMemoryBackend) CancelDomainConfigChange ¶
func (b *InMemoryBackend) CancelDomainConfigChange(ctx context.Context, domainName string) (*Domain, error)
CancelDomainConfigChange cancels any in-progress configuration change for a domain. Because the in-memory backend applies changes synchronously this is a no-op.
func (*InMemoryBackend) CancelElasticsearchServiceSoftwareUpdate ¶
func (b *InMemoryBackend) CancelElasticsearchServiceSoftwareUpdate( ctx context.Context, domainName string, ) (*Domain, error)
CancelElasticsearchServiceSoftwareUpdate cancels a scheduled software update. Because the in-memory backend never schedules updates this is a no-op.
func (*InMemoryBackend) CreateDomain ¶
func (b *InMemoryBackend) CreateDomain(ctx context.Context, inp CreateDomainInput) (*Domain, error)
CreateDomain creates a new Elasticsearch domain.
func (*InMemoryBackend) CreateOutboundCrossClusterSearchConnection ¶
func (b *InMemoryBackend) CreateOutboundCrossClusterSearchConnection( ctx context.Context, localDomain, remoteDomain CrossClusterDomainInfo, alias string, ) (*OutboundConnection, error)
CreateOutboundCrossClusterSearchConnection creates a new outbound cross-cluster search connection request.
func (*InMemoryBackend) CreatePackage ¶
func (b *InMemoryBackend) CreatePackage(ctx context.Context, name, packageType, description string) (*Package, error)
CreatePackage creates a new Elasticsearch package (e.g., a dictionary file).
func (*InMemoryBackend) CreateVpcEndpoint ¶
func (b *InMemoryBackend) CreateVpcEndpoint( ctx context.Context, domainARN string, vpcOptions map[string]string, ) (*VpcEndpoint, error)
CreateVpcEndpoint creates a managed VPC endpoint for an Elasticsearch domain. The endpoint's region is resolved from the domain ARN, falling back to ctx.
func (*InMemoryBackend) DeleteDomain ¶
DeleteDomain removes a domain by name.
func (*InMemoryBackend) DeleteElasticsearchServiceRole ¶
func (b *InMemoryBackend) DeleteElasticsearchServiceRole() error
DeleteElasticsearchServiceRole deletes the Elasticsearch service-linked IAM role. The in-memory backend has no IAM state so this is always a no-op success.
func (*InMemoryBackend) DeleteInboundCrossClusterSearchConnection ¶
func (b *InMemoryBackend) DeleteInboundCrossClusterSearchConnection( ctx context.Context, connectionID string, ) (*InboundConnection, error)
DeleteInboundCrossClusterSearchConnection removes an inbound cross-cluster connection.
func (*InMemoryBackend) DeleteOutboundCrossClusterSearchConnection ¶
func (b *InMemoryBackend) DeleteOutboundCrossClusterSearchConnection( ctx context.Context, connectionID string, ) (*OutboundConnection, error)
DeleteOutboundCrossClusterSearchConnection removes an outbound cross-cluster connection.
func (*InMemoryBackend) DeletePackage ¶
DeletePackage removes a package by ID.
func (*InMemoryBackend) DeleteVpcEndpoint ¶
func (b *InMemoryBackend) DeleteVpcEndpoint(ctx context.Context, vpcEndpointID string) (*VpcEndpoint, error)
DeleteVpcEndpoint removes a VPC endpoint by ID.
func (*InMemoryBackend) DescribeDomain ¶
DescribeDomain returns details about a domain.
func (*InMemoryBackend) DescribeDomainAutoTunes ¶
func (b *InMemoryBackend) DescribeDomainAutoTunes(ctx context.Context, domainName string) error
DescribeDomainAutoTunes validates a domain exists and returns (the in-memory backend has no auto-tune state).
func (*InMemoryBackend) DescribeDomainChangeProgress ¶
func (b *InMemoryBackend) DescribeDomainChangeProgress(ctx context.Context, domainName string) error
DescribeDomainChangeProgress validates a domain exists and returns (changes are synchronous in-memory).
func (*InMemoryBackend) DescribeInboundCrossClusterSearchConnections ¶
func (b *InMemoryBackend) DescribeInboundCrossClusterSearchConnections(ctx context.Context) []*InboundConnection
DescribeInboundCrossClusterSearchConnections returns all inbound cross-cluster connections.
func (*InMemoryBackend) DescribeOutboundCrossClusterSearchConnections ¶
func (b *InMemoryBackend) DescribeOutboundCrossClusterSearchConnections(ctx context.Context) []*OutboundConnection
DescribeOutboundCrossClusterSearchConnections returns all outbound cross-cluster connections.
func (*InMemoryBackend) DescribePackages ¶
func (b *InMemoryBackend) DescribePackages(ctx context.Context, packageIDs []string) []*Package
DescribePackages returns packages matching the given IDs, or all packages if the list is empty.
func (*InMemoryBackend) DescribeReservedElasticsearchInstanceOfferings ¶
func (b *InMemoryBackend) DescribeReservedElasticsearchInstanceOfferings() []ReservedInstanceOffering
DescribeReservedElasticsearchInstanceOfferings returns available reserved instance offerings.
func (*InMemoryBackend) DescribeReservedElasticsearchInstances ¶
func (b *InMemoryBackend) DescribeReservedElasticsearchInstances(ctx context.Context) []ReservedInstance
DescribeReservedElasticsearchInstances returns purchased reserved instances for the request's region.
func (*InMemoryBackend) DescribeVpcEndpoints ¶
func (b *InMemoryBackend) DescribeVpcEndpoints(ctx context.Context, vpcEndpointIDs []string) []*VpcEndpoint
DescribeVpcEndpoints returns VPC endpoints matching the given IDs, or all endpoints if empty.
func (*InMemoryBackend) DissociatePackage ¶
func (b *InMemoryBackend) DissociatePackage(ctx context.Context, packageID, domainName string) error
DissociatePackage removes a package association from a domain.
func (*InMemoryBackend) GetPackageVersionHistory ¶
func (b *InMemoryBackend) GetPackageVersionHistory(ctx context.Context, packageID string) ([]*Package, error)
GetPackageVersionHistory returns the version history for a package.
func (*InMemoryBackend) GetUpgradeHistory ¶
func (b *InMemoryBackend) GetUpgradeHistory(ctx context.Context, domainName string) error
GetUpgradeHistory validates a domain exists and returns empty history (no upgrade state tracked).
func (*InMemoryBackend) GetUpgradeStatus ¶
func (b *InMemoryBackend) GetUpgradeStatus(ctx context.Context, domainName string) error
GetUpgradeStatus validates a domain exists and returns (no upgrade in progress in-memory).
func (*InMemoryBackend) ListDomainNames ¶
func (b *InMemoryBackend) ListDomainNames(ctx context.Context) []string
ListDomainNames returns the sorted names of all domains in the request's region.
func (*InMemoryBackend) ListDomainsForPackage ¶
func (b *InMemoryBackend) ListDomainsForPackage(ctx context.Context, packageID string) ([]string, error)
ListDomainsForPackage returns all domain names associated with a package.
func (*InMemoryBackend) ListPackagesForDomain ¶
func (b *InMemoryBackend) ListPackagesForDomain(ctx context.Context, domainName string) []*Package
ListPackagesForDomain returns all packages associated with a domain.
func (*InMemoryBackend) ListTags ¶
func (b *InMemoryBackend) ListTags(ctx context.Context, domainARN string) (map[string]string, error)
ListTags returns tags for the domain identified by ARN. The region is resolved from the ARN, falling back to the ctx region.
func (*InMemoryBackend) ListVpcEndpointAccess ¶
func (b *InMemoryBackend) ListVpcEndpointAccess(ctx context.Context, domainName string) ([]string, error)
ListVpcEndpointAccess returns authorized account principals for a domain's VPC endpoint access.
func (*InMemoryBackend) ListVpcEndpoints ¶
func (b *InMemoryBackend) ListVpcEndpoints(ctx context.Context) []*VpcEndpoint
ListVpcEndpoints returns all VPC endpoints in the request's region.
func (*InMemoryBackend) ListVpcEndpointsForDomain ¶
func (b *InMemoryBackend) ListVpcEndpointsForDomain(ctx context.Context, domainName string) []*VpcEndpoint
ListVpcEndpointsForDomain returns VPC endpoints associated with a specific domain ARN.
func (*InMemoryBackend) PurchaseReservedElasticsearchInstanceOffering ¶
func (b *InMemoryBackend) PurchaseReservedElasticsearchInstanceOffering( ctx context.Context, offeringID, name string, count int, ) (*ReservedInstance, error)
PurchaseReservedElasticsearchInstanceOffering purchases a reserved instance offering.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the backend's default AWS region.
func (*InMemoryBackend) RejectInboundCrossClusterSearchConnection ¶
func (b *InMemoryBackend) RejectInboundCrossClusterSearchConnection( ctx context.Context, connectionID string, ) (*InboundConnection, error)
RejectInboundCrossClusterSearchConnection rejects a pending inbound connection.
func (*InMemoryBackend) RemoveTags ¶
RemoveTags removes tag keys from the domain identified by ARN.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all in-memory state. It closes all domain Tags to release Prometheus metrics before discarding the domain maps.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.
func (*InMemoryBackend) RevokeVpcEndpointAccess ¶
func (b *InMemoryBackend) RevokeVpcEndpointAccess(ctx context.Context, domainName, account string) error
RevokeVpcEndpointAccess revokes an account's access to a domain's VPC endpoint.
func (*InMemoryBackend) SetDNSRegistrar ¶
func (b *InMemoryBackend) SetDNSRegistrar(dns DNSRegistrar)
SetDNSRegistrar wires a DNS server so Elasticsearch domain hostnames are auto-registered.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) StartElasticsearchServiceSoftwareUpdate ¶
func (b *InMemoryBackend) StartElasticsearchServiceSoftwareUpdate( ctx context.Context, domainName string, ) (*Domain, error)
StartElasticsearchServiceSoftwareUpdate schedules a software update (no-op in-memory).
func (*InMemoryBackend) UpdateDomainConfig ¶
func (b *InMemoryBackend) UpdateDomainConfig(ctx context.Context, name string, cfg UpdateConfig) (*Domain, error)
UpdateDomainConfig updates the cluster configuration and/or EBS options for a domain.
func (*InMemoryBackend) UpdatePackage ¶
func (b *InMemoryBackend) UpdatePackage(ctx context.Context, packageID, description string) (*Package, error)
UpdatePackage updates a package description.
func (*InMemoryBackend) UpdateVpcEndpoint ¶
func (b *InMemoryBackend) UpdateVpcEndpoint( ctx context.Context, vpcEndpointID string, vpcOptions map[string]string, ) (*VpcEndpoint, error)
UpdateVpcEndpoint updates the VPC options of a VPC endpoint.
func (*InMemoryBackend) UpgradeElasticsearchDomain ¶
func (b *InMemoryBackend) UpgradeElasticsearchDomain( ctx context.Context, domainName, targetVersion string, ) (*Domain, error)
UpgradeElasticsearchDomain upgrades a domain to the target version.
type InboundConnection ¶
type InboundConnection struct {
ConnectionID string `json:"connectionID"`
ConnectionStatus string `json:"connectionStatus"`
SourceDomainInfo CrossClusterDomainInfo `json:"sourceDomainInfo"`
DestDomainInfo CrossClusterDomainInfo `json:"destDomainInfo"`
// contains filtered or unexported fields
}
InboundConnection represents an inbound cross-cluster search connection.
type OutboundConnection ¶
type OutboundConnection struct {
ConnectionID string `json:"connectionID"`
ConnectionAlias string `json:"connectionAlias"`
ConnectionStatus string `json:"connectionStatus"`
LocalDomainInfo CrossClusterDomainInfo `json:"localDomainInfo"`
RemoteDomainInfo CrossClusterDomainInfo `json:"remoteDomainInfo"`
// contains filtered or unexported fields
}
OutboundConnection represents an outbound cross-cluster search connection.
type Package ¶
type Package struct {
ID string `json:"packageID"`
Name string `json:"packageName"`
PackageType string `json:"packageType"`
Description string `json:"packageDescription"`
Status string `json:"packageStatus"`
// contains filtered or unexported fields
}
Package represents an Elasticsearch package (e.g., a custom dictionary or synonym file).
type Provider ¶
type Provider struct{}
Provider implements service.Provider for the Elasticsearch service.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the Elasticsearch service backend and handler.
type ReservedInstance ¶
type ReservedInstance struct {
ReservationID string `json:"reservedElasticsearchInstanceId"`
ReservationName string `json:"reservationName"`
OfferingID string `json:"reservedElasticsearchInstanceOfferingId"`
InstanceType string `json:"elasticsearchInstanceType"`
State string `json:"state"`
FixedPrice float64 `json:"fixedPrice"`
UsagePrice float64 `json:"usagePrice"`
Duration int `json:"duration"`
Count int `json:"elasticsearchInstanceCount"`
// contains filtered or unexported fields
}
ReservedInstance represents a purchased reserved Elasticsearch instance.
type ReservedInstanceOffering ¶
type ReservedInstanceOffering struct {
OfferingID string `json:"reservedElasticsearchInstanceOfferingId"`
InstanceType string `json:"elasticsearchInstanceType"`
PaymentOption string `json:"paymentOption"`
Currency string `json:"currencyCode"`
FixedPrice float64 `json:"fixedPrice"`
UsagePrice float64 `json:"usagePrice"`
Duration int `json:"duration"`
}
ReservedInstanceOffering represents a reserved Elasticsearch instance offering.
type SnapshotOptions ¶
type SnapshotOptions struct {
AutomatedSnapshotStartHour int `json:"automatedSnapshotStartHour"`
}
SnapshotOptions holds automated snapshot configuration for a domain.
type UpdateConfig ¶
type UpdateConfig struct {
ClusterConfig *ClusterConfig
EBSOptions *EBSOptions
SnapshotOptions *SnapshotOptions
AdvancedOptions map[string]string
AccessPolicies *string
TLSSecurityPolicy *string
EncryptionAtRestEnabled *bool
NodeToNodeEncryptionEnabled *bool
EnforceHTTPS *bool
}
UpdateConfig holds the fields that can be updated via UpdateDomainConfig.
type VpcEndpoint ¶
type VpcEndpoint struct {
VpcOptions map[string]string `json:"vpcOptions"`
ID string `json:"vpcEndpointID"`
OwnerAccountID string `json:"ownerAccountID"`
DomainARN string `json:"domainARN"`
Endpoint string `json:"endpoint"`
Status string `json:"status"`
AuthorizedAccts []string `json:"authorizedAccounts"`
// contains filtered or unexported fields
}
VpcEndpoint represents a managed VPC endpoint for an Elasticsearch domain.
type ZoneAwarenessConfig ¶
type ZoneAwarenessConfig struct {
AvailabilityZoneCount int `json:"availabilityZoneCount"`
}
ZoneAwarenessConfig holds the zone awareness configuration for a cluster.
Source Files
¶
- domain_config.go
- domain_lifecycle.go
- domains.go
- errors.go
- handler.go
- handler_domain_config.go
- handler_domain_lifecycle.go
- handler_domains.go
- handler_inbound_connections.go
- handler_outbound_connections.go
- handler_packages.go
- handler_reserved_instances.go
- handler_routing.go
- handler_tags.go
- handler_versions.go
- handler_vpc_endpoints.go
- inbound_connections.go
- models.go
- outbound_connections.go
- packages.go
- persistence.go
- provider.go
- reserved_instances.go
- store.go
- store_setup.go
- tags.go
- vpc_endpoints.go