Documentation
¶
Index ¶
- Constants
- Variables
- func AddSearch(client search.Client, watcher *watcher.Watcher[*OpenSearch])
- func NamePrefix(teamSlug slug.Slug) string
- func NewLoaderContext(ctx context.Context, tenantName string, watcher *watcher.Watcher[*OpenSearch], ...) context.Context
- func NewWatcher(ctx context.Context, mgr *watcher.Manager) *watcher.Watcher[*OpenSearch]
- type AivenDataLoaderKey
- type CreateOpenSearchCredentialsInput
- type CreateOpenSearchCredentialsPayload
- type CreateOpenSearchInput
- type CreateOpenSearchPayload
- type DeleteOpenSearchInput
- type DeleteOpenSearchPayload
- type OpenSearch
- func Get(ctx context.Context, teamSlug slug.Slug, environment, name string) (*OpenSearch, error)
- func GetByIdent(ctx context.Context, id ident.Ident) (*OpenSearch, error)
- func GetForWorkload(ctx context.Context, teamSlug slug.Slug, environment string, ...) (*OpenSearch, error)
- func ListAllForTeam(ctx context.Context, teamSlug slug.Slug, filter *OpenSearchFilter) []*OpenSearch
- func (r *OpenSearch) DeepCopyObject() runtime.Object
- func (r *OpenSearch) FullyQualifiedName() string
- func (r *OpenSearch) GetLabels() map[string]string
- func (r *OpenSearch) GetName() string
- func (r *OpenSearch) GetNamespace() string
- func (r *OpenSearch) GetObjectKind() schema.ObjectKind
- func (o OpenSearch) ID() ident.Ident
- func (OpenSearch) IsActivityLogger()
- func (OpenSearch) IsNode()
- func (OpenSearch) IsPersistence()
- func (OpenSearch) IsSearchNode()
- type OpenSearchAccess
- type OpenSearchAccessConnection
- type OpenSearchAccessEdge
- type OpenSearchAccessOrder
- type OpenSearchAccessOrderField
- type OpenSearchConnection
- type OpenSearchCreatedActivityLogEntry
- type OpenSearchCredentials
- type OpenSearchDeletedActivityLogEntry
- type OpenSearchEdge
- type OpenSearchFacets
- func (f *OpenSearchFacets) Environments(ctx context.Context) []model.StringFacetItem
- func (f *OpenSearchFacets) Filtered(ctx context.Context) []*OpenSearch
- func (f *OpenSearchFacets) Labels(ctx context.Context) []model.LabelFacetItem
- func (f *OpenSearchFacets) Tiers(ctx context.Context) []OpenSearchTierFacetItem
- type OpenSearchFilter
- type OpenSearchInput
- type OpenSearchMajorVersion
- func (e OpenSearchMajorVersion) IsValid() bool
- func (e OpenSearchMajorVersion) MarshalGQL(w io.Writer)
- func (e OpenSearchMajorVersion) String() string
- func (e OpenSearchMajorVersion) ToAivenString() (string, error)
- func (e *OpenSearchMajorVersion) UnmarshalGQL(v any) error
- func (e OpenSearchMajorVersion) ValidateUpgradePath(other OpenSearchMajorVersion) error
- type OpenSearchMemory
- type OpenSearchMetadataInput
- type OpenSearchOrder
- type OpenSearchOrderField
- type OpenSearchState
- type OpenSearchStatus
- type OpenSearchTier
- type OpenSearchTierFacetItem
- type OpenSearchUpdatedActivityLogEntry
- type OpenSearchUpdatedActivityLogEntryData
- type OpenSearchUpdatedActivityLogEntryDataUpdatedField
- type OpenSearchVersion
- type StorageGB
- type TeamInventoryCountOpenSearches
- type UpdateOpenSearchInput
- type UpdateOpenSearchPayload
Constants ¶
View Source
const (
ActivityLogEntryResourceTypeOpenSearch activitylog.ActivityLogEntryResourceType = "OPENSEARCH"
)
Variables ¶
View Source
var ( SortFilterOpenSearch = sortfilter.New[*OpenSearch, OpenSearchOrderField, *OpenSearchFilter]() SortFilterOpenSearchAccess = sortfilter.New[*OpenSearchAccess, OpenSearchAccessOrderField, struct{}]() )
View Source
var AllOpenSearchState = []OpenSearchState{ OpenSearchStatePoweroff, OpenSearchStateRebalancing, OpenSearchStateRebuilding, OpenSearchStateRunning, OpenSearchStateUnknown, }
Functions ¶
func NamePrefix ¶
NamePrefix returns the Kubernetes resource name prefix for OpenSearch instances belonging to the given team (e.g. "opensearch-myteam-").
func NewLoaderContext ¶
func NewLoaderContext(ctx context.Context, tenantName string, watcher *watcher.Watcher[*OpenSearch], aivenClient aiven.AivenClient, logger logrus.FieldLogger) context.Context
func NewWatcher ¶
Types ¶
type AivenDataLoaderKey ¶
type CreateOpenSearchCredentialsInput ¶
type CreateOpenSearchCredentialsInput struct {
TeamSlug slug.Slug `json:"teamSlug"`
EnvironmentName string `json:"environmentName"`
InstanceName string `json:"instanceName"`
Permission aivencredentials.CredentialPermission `json:"permission"`
TTL string `json:"ttl"`
}
type CreateOpenSearchCredentialsPayload ¶
type CreateOpenSearchCredentialsPayload struct {
Credentials *OpenSearchCredentials `json:"credentials"`
}
func CreateOpenSearchCredentials ¶
func CreateOpenSearchCredentials(ctx context.Context, input CreateOpenSearchCredentialsInput) (*CreateOpenSearchCredentialsPayload, error)
type CreateOpenSearchInput ¶
type CreateOpenSearchInput struct {
OpenSearchInput
}
type CreateOpenSearchPayload ¶
type CreateOpenSearchPayload struct {
OpenSearch *OpenSearch `json:"openSearch"`
}
func Create ¶
func Create(ctx context.Context, input CreateOpenSearchInput) (*CreateOpenSearchPayload, error)
type DeleteOpenSearchInput ¶
type DeleteOpenSearchInput struct {
OpenSearchMetadataInput
}
type DeleteOpenSearchPayload ¶
type DeleteOpenSearchPayload struct {
OpenSearchDeleted *bool `json:"openSearchDeleted,omitempty"`
}
func Delete ¶
func Delete(ctx context.Context, input DeleteOpenSearchInput) (*DeleteOpenSearchPayload, error)
type OpenSearch ¶
type OpenSearch struct {
Name string `json:"name"`
Status *OpenSearchStatus `json:"status"`
TerminationProtection bool `json:"terminationProtection"`
Tier OpenSearchTier `json:"tier"`
Memory OpenSearchMemory `json:"memory"`
StorageGB StorageGB `json:"storageGB"`
Labels []*model.ResourceLabel `json:"labels"`
TeamSlug slug.Slug `json:"-"`
EnvironmentName string `json:"-"`
WorkloadReference *workload.Reference `json:"-"`
AivenProject string `json:"-"`
MajorVersion OpenSearchMajorVersion `json:"-"`
}
func GetByIdent ¶
func GetForWorkload ¶
func GetForWorkload(ctx context.Context, teamSlug slug.Slug, environment string, reference *nais_io_v1.OpenSearch) (*OpenSearch, error)
func ListAllForTeam ¶
func ListAllForTeam(ctx context.Context, teamSlug slug.Slug, filter *OpenSearchFilter) []*OpenSearch
func (*OpenSearch) DeepCopyObject ¶
func (r *OpenSearch) DeepCopyObject() runtime.Object
func (*OpenSearch) FullyQualifiedName ¶
func (r *OpenSearch) FullyQualifiedName() string
func (*OpenSearch) GetLabels ¶
func (r *OpenSearch) GetLabels() map[string]string
func (*OpenSearch) GetName ¶
func (r *OpenSearch) GetName() string
func (*OpenSearch) GetNamespace ¶
func (r *OpenSearch) GetNamespace() string
func (*OpenSearch) GetObjectKind ¶
func (r *OpenSearch) GetObjectKind() schema.ObjectKind
func (OpenSearch) ID ¶
func (o OpenSearch) ID() ident.Ident
func (OpenSearch) IsActivityLogger ¶
func (OpenSearch) IsActivityLogger()
func (OpenSearch) IsNode ¶
func (OpenSearch) IsNode()
func (OpenSearch) IsPersistence ¶
func (OpenSearch) IsPersistence()
func (OpenSearch) IsSearchNode ¶
func (OpenSearch) IsSearchNode()
type OpenSearchAccess ¶
type OpenSearchAccessConnection ¶
type OpenSearchAccessConnection = pagination.Connection[*OpenSearchAccess]
func ListAccess ¶
func ListAccess(ctx context.Context, openSearch *OpenSearch, page *pagination.Pagination, orderBy *OpenSearchAccessOrder) (*OpenSearchAccessConnection, error)
type OpenSearchAccessEdge ¶
type OpenSearchAccessEdge = pagination.Edge[*OpenSearchAccess]
type OpenSearchAccessOrder ¶
type OpenSearchAccessOrder struct {
Field OpenSearchAccessOrderField `json:"field"`
Direction model.OrderDirection `json:"direction"`
}
type OpenSearchAccessOrderField ¶
type OpenSearchAccessOrderField string
func (OpenSearchAccessOrderField) IsValid ¶
func (e OpenSearchAccessOrderField) IsValid() bool
func (OpenSearchAccessOrderField) MarshalGQL ¶
func (e OpenSearchAccessOrderField) MarshalGQL(w io.Writer)
func (OpenSearchAccessOrderField) String ¶
func (e OpenSearchAccessOrderField) String() string
func (*OpenSearchAccessOrderField) UnmarshalGQL ¶
func (e *OpenSearchAccessOrderField) UnmarshalGQL(v any) error
type OpenSearchConnection ¶
type OpenSearchConnection = pagination.FacetableConnection[*OpenSearch, *OpenSearchFilter]
func ListForTeam ¶
func ListForTeam(ctx context.Context, teamSlug slug.Slug, page *pagination.Pagination, orderBy *OpenSearchOrder, filter *OpenSearchFilter) (*OpenSearchConnection, error)
type OpenSearchCreatedActivityLogEntry ¶
type OpenSearchCreatedActivityLogEntry struct {
activitylog.GenericActivityLogEntry
}
type OpenSearchCredentials ¶
type OpenSearchDeletedActivityLogEntry ¶
type OpenSearchDeletedActivityLogEntry struct {
activitylog.GenericActivityLogEntry
}
type OpenSearchEdge ¶
type OpenSearchEdge = pagination.Edge[*OpenSearch]
type OpenSearchFacets ¶
type OpenSearchFacets struct {
AllOpenSearches []*OpenSearch
Filter *OpenSearchFilter
// contains filtered or unexported fields
}
func (*OpenSearchFacets) Environments ¶
func (f *OpenSearchFacets) Environments(ctx context.Context) []model.StringFacetItem
Environments computes environments facets for an OpenSearch query.
func (*OpenSearchFacets) Filtered ¶
func (f *OpenSearchFacets) Filtered(ctx context.Context) []*OpenSearch
Filtered returns the filtered OpenSearch instances, computing it exactly once per request.
func (*OpenSearchFacets) Labels ¶
func (f *OpenSearchFacets) Labels(ctx context.Context) []model.LabelFacetItem
Labels computes labels facets for an OpenSearch query.
func (*OpenSearchFacets) Tiers ¶
func (f *OpenSearchFacets) Tiers(ctx context.Context) []OpenSearchTierFacetItem
Tiers computes tiers facets for an OpenSearch query.
type OpenSearchFilter ¶
type OpenSearchFilter struct {
Name string `json:"name"`
Environments []string `json:"environments"`
Tiers []OpenSearchTier `json:"tiers"`
Labels model.LabelFilters `json:"labels,omitempty"`
}
type OpenSearchInput ¶
type OpenSearchInput struct {
OpenSearchMetadataInput
Tier OpenSearchTier `json:"tier"`
Memory OpenSearchMemory `json:"memory"`
Version OpenSearchMajorVersion `json:"version"`
StorageGB StorageGB `json:"storageGB"`
}
func (*OpenSearchInput) ValidationErrors ¶
func (o *OpenSearchInput) ValidationErrors(ctx context.Context) *validate.ValidationErrors
type OpenSearchMajorVersion ¶
type OpenSearchMajorVersion string
const ( OpenSearchMajorVersionV1 OpenSearchMajorVersion = "V1" OpenSearchMajorVersionV2 OpenSearchMajorVersion = "V2" OpenSearchMajorVersionV2_19 OpenSearchMajorVersion = "V2_19" OpenSearchMajorVersionV3_3 OpenSearchMajorVersion = "V3_3" )
func OpenSearchMajorVersionFromAivenString ¶
func OpenSearchMajorVersionFromAivenString(s string) (OpenSearchMajorVersion, error)
func (OpenSearchMajorVersion) IsValid ¶
func (e OpenSearchMajorVersion) IsValid() bool
func (OpenSearchMajorVersion) MarshalGQL ¶
func (e OpenSearchMajorVersion) MarshalGQL(w io.Writer)
func (OpenSearchMajorVersion) String ¶
func (e OpenSearchMajorVersion) String() string
func (OpenSearchMajorVersion) ToAivenString ¶
func (e OpenSearchMajorVersion) ToAivenString() (string, error)
ToAivenString returns the version string without the "V" prefix, e.g. "2" or "1".
func (*OpenSearchMajorVersion) UnmarshalGQL ¶
func (e *OpenSearchMajorVersion) UnmarshalGQL(v any) error
func (OpenSearchMajorVersion) ValidateUpgradePath ¶
func (e OpenSearchMajorVersion) ValidateUpgradePath(other OpenSearchMajorVersion) error
type OpenSearchMemory ¶
type OpenSearchMemory string
const ( OpenSearchMemoryGB2 OpenSearchMemory = "GB_2" OpenSearchMemoryGB4 OpenSearchMemory = "GB_4" OpenSearchMemoryGB8 OpenSearchMemory = "GB_8" OpenSearchMemoryGB16 OpenSearchMemory = "GB_16" OpenSearchMemoryGB32 OpenSearchMemory = "GB_32" OpenSearchMemoryGB64 OpenSearchMemory = "GB_64" )
func (OpenSearchMemory) IsValid ¶
func (e OpenSearchMemory) IsValid() bool
func (OpenSearchMemory) MarshalGQL ¶
func (e OpenSearchMemory) MarshalGQL(w io.Writer)
func (OpenSearchMemory) String ¶
func (e OpenSearchMemory) String() string
func (*OpenSearchMemory) UnmarshalGQL ¶
func (e *OpenSearchMemory) UnmarshalGQL(v any) error
type OpenSearchMetadataInput ¶
type OpenSearchMetadataInput struct {
Name string `json:"name"`
EnvironmentName string `json:"environmentName"`
TeamSlug slug.Slug `json:"teamSlug"`
}
func (*OpenSearchMetadataInput) Validate ¶
func (v *OpenSearchMetadataInput) Validate(ctx context.Context) error
func (*OpenSearchMetadataInput) ValidationErrors ¶
func (o *OpenSearchMetadataInput) ValidationErrors(ctx context.Context) *validate.ValidationErrors
type OpenSearchOrder ¶
type OpenSearchOrder struct {
Field OpenSearchOrderField `json:"field"`
Direction model.OrderDirection `json:"direction"`
}
type OpenSearchOrderField ¶
type OpenSearchOrderField string
func (OpenSearchOrderField) IsValid ¶
func (e OpenSearchOrderField) IsValid() bool
func (OpenSearchOrderField) MarshalGQL ¶
func (e OpenSearchOrderField) MarshalGQL(w io.Writer)
func (OpenSearchOrderField) String ¶
func (e OpenSearchOrderField) String() string
func (*OpenSearchOrderField) UnmarshalGQL ¶
func (e *OpenSearchOrderField) UnmarshalGQL(v any) error
type OpenSearchState ¶
type OpenSearchState int
const ( OpenSearchStateUnknown OpenSearchState = iota OpenSearchStateRunning OpenSearchStateRebalancing OpenSearchStateRebuilding OpenSearchStatePoweroff )
func State ¶
func State(ctx context.Context, os *OpenSearch) (OpenSearchState, error)
func (OpenSearchState) IsValid ¶
func (e OpenSearchState) IsValid() bool
func (OpenSearchState) MarshalGQL ¶
func (e OpenSearchState) MarshalGQL(w io.Writer)
func (OpenSearchState) String ¶
func (e OpenSearchState) String() string
func (*OpenSearchState) UnmarshalGQL ¶
func (e *OpenSearchState) UnmarshalGQL(v any) error
type OpenSearchStatus ¶
type OpenSearchTier ¶
type OpenSearchTier string
const ( OpenSearchTierSingleNode OpenSearchTier = "SINGLE_NODE" OpenSearchTierHighAvailability OpenSearchTier = "HIGH_AVAILABILITY" )
func (OpenSearchTier) IsValid ¶
func (e OpenSearchTier) IsValid() bool
func (OpenSearchTier) MarshalGQL ¶
func (e OpenSearchTier) MarshalGQL(w io.Writer)
func (OpenSearchTier) String ¶
func (e OpenSearchTier) String() string
func (*OpenSearchTier) UnmarshalGQL ¶
func (e *OpenSearchTier) UnmarshalGQL(v any) error
type OpenSearchTierFacetItem ¶
type OpenSearchTierFacetItem struct {
Tier OpenSearchTier `json:"tier"`
Count int `json:"count"`
}
type OpenSearchUpdatedActivityLogEntry ¶
type OpenSearchUpdatedActivityLogEntry struct {
activitylog.GenericActivityLogEntry
Data *OpenSearchUpdatedActivityLogEntryData `json:"data"`
}
type OpenSearchUpdatedActivityLogEntryData ¶
type OpenSearchUpdatedActivityLogEntryData struct {
UpdatedFields []*OpenSearchUpdatedActivityLogEntryDataUpdatedField `json:"updatedFields"`
}
type OpenSearchVersion ¶
type OpenSearchVersion struct {
Actual *string `json:"actual,omitempty"`
DesiredMajor OpenSearchMajorVersion `json:"desiredMajor"`
}
func GetOpenSearchVersion ¶
func GetOpenSearchVersion(ctx context.Context, os *OpenSearch) (*OpenSearchVersion, error)
type StorageGB ¶
type StorageGB int
func (StorageGB) MarshalGQL ¶
func (StorageGB) ToAivenString ¶
func (*StorageGB) UnmarshalGQL ¶
type TeamInventoryCountOpenSearches ¶
type TeamInventoryCountOpenSearches struct {
Total int
}
type UpdateOpenSearchInput ¶
type UpdateOpenSearchInput struct {
OpenSearchInput
Labels []*model.ResourceLabel `json:"labels,omitempty"`
}
type UpdateOpenSearchPayload ¶
type UpdateOpenSearchPayload struct {
OpenSearch *OpenSearch `json:"openSearch"`
}
func Update ¶
func Update(ctx context.Context, input UpdateOpenSearchInput) (*UpdateOpenSearchPayload, error)
Click to show internal directories.
Click to hide internal directories.