Documentation
¶
Index ¶
- type ArangoAgency
- type ArangoAgencyGet
- type ArangoApplier
- type DeploymentAgencyMaintenance
- type DeploymentClient
- type DeploymentDatabaseClient
- type DeploymentEndpoints
- type DeploymentGetter
- type DeploymentImageManager
- type DeploymentInfoGetter
- type DeploymentMemberClient
- type DeploymentMemberStatusUpdateErrFunc
- type DeploymentMemberStatusUpdateFunc
- type DeploymentPodRenderer
- type DeploymentStatusUpdate
- type DeploymentStatusUpdateErrFunc
- type DeploymentStatusUpdateFunc
- type DeploymentSyncClient
- type KubernetesEventGenerator
- type ServerGroupIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArangoAgency ¶
type ArangoAgency interface {
ArangoAgencyGet
RefreshAgencyCache(ctx context.Context) (uint64, error)
}
type ArangoAgencyGet ¶
type ArangoAgencyGet interface {
// WithAgencyCache executes the given action with the agency cache using a Read lock. Returns true if action was applied
WithAgencyCache(action func(state.State)) bool
// GetAgencyCache returns the agency cache.
// It can cause to Read/Write error when state is reloaded.
// It is recommended to use WithAgencyCache instead.
GetAgencyCache() (state.State, bool)
GetAgencyArangoDBCache() (state.DB, bool)
GetAgencyHealth() (agencyCache.Health, bool)
ShardsInSyncMap() (state.ShardsSyncStatus, bool)
}
type ArangoApplier ¶
type DeploymentClient ¶
type DeploymentClient interface {
DeploymentDatabaseClient
DeploymentMemberClient
DeploymentSyncClient
}
DeploymentClient provides functionalities to get deployment's clients.
type DeploymentDatabaseClient ¶
type DeploymentDatabaseClient interface {
// GetDatabaseAsyncClient returns a cached client for the entire database (cluster coordinators or single server),
// creating one if needed. Only in AsyncMode
GetDatabaseAsyncClient(ctx context.Context) (driver.Client, error)
// GetServerAsyncClient returns an async client for a specific server.
GetServerAsyncClient(id string) (driver.Client, error)
}
type DeploymentEndpoints ¶
type DeploymentEndpoints interface {
// GenerateMemberEndpoint generates endpoint for a member
GenerateMemberEndpoint(group api.ServerGroup, member api.MemberStatus) (string, error)
}
type DeploymentGetter ¶
type DeploymentGetter interface {
DeploymentClient
DeploymentInfoGetter
}
DeploymentGetter provides functionalities to get deployment resources.
type DeploymentImageManager ¶
type DeploymentImageManager interface {
// SelectImage select currently used image by pod
SelectImage(spec api.DeploymentSpec, status api.DeploymentStatus) (api.ImageInfo, bool)
// SelectImageForMember select currently used image by pod in member
SelectImageForMember(spec api.DeploymentSpec, status api.DeploymentStatus, member api.MemberStatus) (api.ImageInfo, bool)
}
type DeploymentInfoGetter ¶
type DeploymentInfoGetter interface {
// GetAPIObject returns the deployment as k8s object.
GetAPIObject() k8sutil.APIObject
// GetSpec returns the current specification of the deployment
GetSpec() api.DeploymentSpec
// GetStatus returns the current status of the deployment
GetStatus() api.DeploymentStatus
// GetMode the specified mode of deployment
GetMode() api.DeploymentMode
// GetName returns the name of the deployment
GetName() string
// GetNamespace returns the namespace that contains the deployment
GetNamespace() string
// IsSyncEnabled returns information if sync is enabled
IsSyncEnabled() bool
}
type DeploymentMemberClient ¶
type DeploymentMemberStatusUpdateErrFunc ¶
type DeploymentMemberStatusUpdateErrFunc func(s *api.MemberStatus) (bool, error)
type DeploymentMemberStatusUpdateFunc ¶
type DeploymentMemberStatusUpdateFunc func(s *api.MemberStatus) bool
type DeploymentPodRenderer ¶
type DeploymentPodRenderer interface {
// RenderPodForMember Renders Pod definition for member
RenderPodForMember(ctx context.Context, acs sutil.ACS, spec api.DeploymentSpec, status api.DeploymentStatus, memberID string, imageInfo api.ImageInfo) (*core.Pod, error)
// RenderPodTemplateForMember Renders PodTemplate definition for member
RenderPodTemplateForMember(ctx context.Context, acs sutil.ACS, spec api.DeploymentSpec, status api.DeploymentStatus, memberID string, imageInfo api.ImageInfo) (*core.PodTemplateSpec, error)
DeploymentEndpoints
}
type DeploymentStatusUpdate ¶
type DeploymentStatusUpdate interface {
// WithStatusUpdateErr update status of ArangoDeployment with defined modifier. If action returns True action is taken
WithStatusUpdateErr(ctx context.Context, action DeploymentStatusUpdateErrFunc) error
// WithStatusUpdate update status of ArangoDeployment with defined modifier. If action returns True action is taken
WithStatusUpdate(ctx context.Context, action DeploymentStatusUpdateFunc) error
// WithMemberStatusUpdateErr update status of ArangoDeployment Member with defined modifier. If action returns True action is taken
WithMemberStatusUpdateErr(ctx context.Context, id string, group api.ServerGroup, action DeploymentMemberStatusUpdateErrFunc) error
// WithMemberStatusUpdate update status of ArangoDeployment Member with defined modifier. If action returns True action is taken
WithMemberStatusUpdate(ctx context.Context, id string, group api.ServerGroup, action DeploymentMemberStatusUpdateFunc) error
// UpdateStatus replaces the status of the deployment with the given status and
// updates the resources in k8s.
UpdateStatus(ctx context.Context, status api.DeploymentStatus) error
// UpdateMember updates the deployment status wrt the given member.
UpdateMember(ctx context.Context, member api.MemberStatus) error
}
type DeploymentStatusUpdateErrFunc ¶
type DeploymentStatusUpdateErrFunc func(s *api.DeploymentStatus) (bool, error)
type DeploymentStatusUpdateFunc ¶
type DeploymentStatusUpdateFunc func(s *api.DeploymentStatus) bool
type DeploymentSyncClient ¶
type ServerGroupIterator ¶
type ServerGroupIterator interface {
// ForeachServerGroupAccepted calls the given callback for all accepted server groups.
// If the callback returns an error, this error is returned and no other server
// groups are processed.
// Groups are processed in this order: agents, single, dbservers, coordinators, syncmasters, syncworkers
ForeachServerGroupAccepted(cb api.ServerGroupFunc, status *api.DeploymentStatus) error
}
ServerGroupIterator provides a helper to callback on every server group of the deployment.
Click to show internal directories.
Click to hide internal directories.