Documentation
¶
Overview ¶
Package memorydb emulates Amazon MemoryDB over JSON 1.1. Clusters run as one-node Valkey (or Redis) clusters in Docker, and the users of their ACL are put in the server with ACL SETUSER; subnet groups, parameter groups, snapshots and tags are metadata. Without Docker the API still answers. ponytail: TLS is recorded, not served; IAM users exist but cannot sign in (ElastiCache's token proxy is not wired here).
Index ¶
- type ACL
- type Cluster
- type EngineVersion
- type Node
- type Parameter
- type ParameterGroup
- type SecurityGroupMembership
- type Service
- func (s *Service) Close() error
- func (s *Service) Info() core.Info
- func (s *Service) Inspect(table, id string) any
- func (s *Service) Load(b []byte) error
- func (s *Service) Reset()
- func (s *Service) Resources() []core.Table
- func (s *Service) Save() ([]byte, error)
- func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type Shard
- type Snapshot
- type Subnet
- type SubnetGroup
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL struct {
Name, Status string
UserNames []string
MinimumEngineVersion string
Clusters []string `json:",omitempty"`
ARN string
}
ACL is an access control list: users a cluster lets in.
type Cluster ¶
type Cluster struct {
Name, Description, Status string
NumberOfShards int
Shards []Shard `json:",omitempty"`
AvailabilityMode string
ClusterEndpoint *rds.Endpoint `json:",omitempty"`
NodeType, Engine, EngineVersion string
EnginePatchVersion string
ParameterGroupName, ParameterGroupStatus string
SecurityGroups []SecurityGroupMembership `json:",omitempty"`
SubnetGroupName string
TLSEnabled bool
KmsKeyId string `json:",omitempty"`
ARN string
SnsTopicArn string `json:",omitempty"`
SnsTopicStatus string `json:",omitempty"`
SnapshotRetentionLimit int
MaintenanceWindow, SnapshotWindow, ACLName string
AutoMinorVersionUpgrade bool
DataTiering, NetworkType, IpDiscovery string
}
Cluster is a MemoryDB cluster.
type EngineVersion ¶
type EngineVersion struct{ Engine, EngineVersion, EnginePatchVersion, ParameterGroupFamily string }
EngineVersion is an engine version pogi offers.
type Node ¶
type Node struct {
Name, Status, AvailabilityZone string
CreateTime core.Time
Endpoint *rds.Endpoint `json:",omitempty"`
}
Node is a node of a shard.
type Parameter ¶
type Parameter struct{ Name, Value, Description, DataType, AllowedValues, MinimumEngineVersion string }
Parameter is a parameter of a parameter group.
type ParameterGroup ¶
type ParameterGroup struct {
Name, Family, Description, ARN string
Params map[string]string `json:"params,omitempty"` // pogi's: values set
}
ParameterGroup is a parameter group.
type SecurityGroupMembership ¶
type SecurityGroupMembership struct{ SecurityGroupId, Status string }
SecurityGroupMembership is a security group of a cluster.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the MemoryDB emulator.
func (*Service) Close ¶
Close removes the containers, except those persisted state resumes next run.
func (*Service) Load ¶
Load restores state and reconnects to the containers by name; those of dropped clusters go.
type Snapshot ¶
type Snapshot struct {
Name, Status, Source string
KmsKeyId string `json:",omitempty"`
ARN string
ClusterConfiguration struct {
Name, Description, NodeType, Engine, EngineVersion, MaintenanceWindow string
TopicArn string `json:",omitempty"`
Port int
ParameterGroupName, SubnetGroupName, VpcId string
SnapshotRetentionLimit int
SnapshotWindow string
NumShards int
}
DataTiering string
}
Snapshot is a snapshot of a cluster. ponytail: metadata only; restoring one makes an empty cluster.
type Subnet ¶
type Subnet struct {
Identifier string
AvailabilityZone struct{ Name string }
SupportedNetworkTypes []string
}
Subnet is a subnet of a subnet group.