Documentation
¶
Index ¶
- func GetControllerName() string
- func GetControllerNamespace() string
- func GetDatabaseNamespace(id databaseapi.DatabaseId) string
- func GetName() string
- func GetNamespace() string
- func GetPartitionIDFromPartitionAnnotations(partition *v1beta3.Partition) (int32, error)
- func GetPartitionLabelsForDatabase(database *v1beta3.Database) map[string]string
- func GetPartitionName(database *v1beta3.Database, partition int) string
- func GetPartitionNamespacedName(database *v1beta3.Database, partition int) types.NamespacedName
- func GetPartitionServiceName(database *v1beta3.Database, partition int) string
- func GetQualifiedControllerName() string
- func GetWebhookName() string
- func GetWebhookPath() string
- func NewDatabaseController(mgr manager.Manager) (controller.Controller, error)
- func NewDatabaseProto(database *v1beta3.Database) *databaseapi.Database
- func NewMemberController(mgr manager.Manager, responseCh chan<- membershipapi.JoinGroupResponse) (controller.Controller, error)
- func NewPartition(database *v1beta3.Database, partition int) *v1beta3.Partition
- func NewPartitionProto(p *v1beta3.Partition) *databaseapi.Partition
- func RegisterControllers(mgr manager.Manager) error
- type Controller
- func (c *Controller) CreatePrimitive(ctx context.Context, request *primitiveapi.CreatePrimitiveRequest) (*primitiveapi.CreatePrimitiveResponse, error)
- func (c *Controller) DeletePrimitive(ctx context.Context, request *primitiveapi.DeletePrimitiveRequest) (*primitiveapi.DeletePrimitiveResponse, error)
- func (c *Controller) GetDatabase(ctx context.Context, request *databaseapi.GetDatabaseRequest) (*databaseapi.GetDatabaseResponse, error)
- func (c *Controller) GetDatabases(ctx context.Context, request *databaseapi.GetDatabasesRequest) (*databaseapi.GetDatabasesResponse, error)
- func (c *Controller) GetPrimitive(ctx context.Context, request *primitiveapi.GetPrimitiveRequest) (*primitiveapi.GetPrimitiveResponse, error)
- func (c *Controller) GetPrimitives(ctx context.Context, request *primitiveapi.GetPrimitivesRequest) (*primitiveapi.GetPrimitivesResponse, error)
- func (c *Controller) JoinGroup(request *membershipapi.JoinGroupRequest, ...) error
- func (c *Controller) Start(stop <-chan struct{}) error
- type DatabaseReconciler
- type MemberReconciler
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetControllerName ¶
func GetControllerName() string
GetControllerName gets the name of the current controller from the environment
func GetControllerNamespace ¶
func GetControllerNamespace() string
GetControllerNamespace gets the controller's namespace from the environment
func GetDatabaseNamespace ¶
func GetDatabaseNamespace(id databaseapi.DatabaseId) string
GetDatabaseNamespace returns the Database namespace for the given database ID
func GetPartitionIDFromPartitionAnnotations ¶
GetPartitionIDFromPartitionAnnotations returns the partition ID from the given partition annotations
func GetPartitionLabelsForDatabase ¶
GetPartitionLabelsForDatabase returns the labels for the partitions in the given database
func GetPartitionName ¶
GetPartitionName returns the partition name for the given partition
func GetPartitionNamespacedName ¶
func GetPartitionNamespacedName(database *v1beta3.Database, partition int) types.NamespacedName
GetPartitionNamespacedName returns the NamespacedName for the given partition
func GetPartitionServiceName ¶
GetPartitionServiceName returns the service name for the given partition
func GetQualifiedControllerName ¶
func GetQualifiedControllerName() string
GetQualifiedControllerName returns the qualified controller name
func NewDatabaseController ¶
func NewDatabaseController(mgr manager.Manager) (controller.Controller, error)
NewDatabaseController creates a new Database controller and adds it to the Manager. The Manager will set fields on the controller and Start it when the Manager is Started.
func NewDatabaseProto ¶
func NewDatabaseProto(database *v1beta3.Database) *databaseapi.Database
NewDatabaseProto returns a Database proto message for the given Database
func NewMemberController ¶
func NewMemberController(mgr manager.Manager, responseCh chan<- membershipapi.JoinGroupResponse) (controller.Controller, error)
NewMemberController creates a new Database controller and adds it to the Manager. The Manager will set fields on the controller and Start it when the Manager is Started.
func NewPartition ¶
NewPartition returns the configuration for the given partition
func NewPartitionProto ¶
func NewPartitionProto(p *v1beta3.Partition) *databaseapi.Partition
NewPartitionProto returns the partition proto message for the given Partition
func RegisterControllers ¶
RegisterControllers adds the Atomix controller to the k8s controller manager
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller an implementation of the Atomix controller API
func (*Controller) CreatePrimitive ¶
func (c *Controller) CreatePrimitive(ctx context.Context, request *primitiveapi.CreatePrimitiveRequest) (*primitiveapi.CreatePrimitiveResponse, error)
CreatePrimitive handles a create primitive request
func (*Controller) DeletePrimitive ¶
func (c *Controller) DeletePrimitive(ctx context.Context, request *primitiveapi.DeletePrimitiveRequest) (*primitiveapi.DeletePrimitiveResponse, error)
DeletePrimitive handles a delete primitive request
func (*Controller) GetDatabase ¶
func (c *Controller) GetDatabase(ctx context.Context, request *databaseapi.GetDatabaseRequest) (*databaseapi.GetDatabaseResponse, error)
GetDatabase get a database managed by the controller
func (*Controller) GetDatabases ¶
func (c *Controller) GetDatabases(ctx context.Context, request *databaseapi.GetDatabasesRequest) (*databaseapi.GetDatabasesResponse, error)
GetDatabases get a list of databases managed by the controller
func (*Controller) GetPrimitive ¶
func (c *Controller) GetPrimitive(ctx context.Context, request *primitiveapi.GetPrimitiveRequest) (*primitiveapi.GetPrimitiveResponse, error)
GetPrimitive handles a get primitive request
func (*Controller) GetPrimitives ¶
func (c *Controller) GetPrimitives(ctx context.Context, request *primitiveapi.GetPrimitivesRequest) (*primitiveapi.GetPrimitivesResponse, error)
GetPrimitives handles a list primitives request
func (*Controller) JoinGroup ¶
func (c *Controller) JoinGroup(request *membershipapi.JoinGroupRequest, stream membershipapi.MembershipService_JoinGroupServer) error
JoinGroup handles a group join request
func (*Controller) Start ¶
func (c *Controller) Start(stop <-chan struct{}) error
Start starts the controller server
type DatabaseReconciler ¶
type DatabaseReconciler struct {
// contains filtered or unexported fields
}
DatabaseReconciler reconciles a Database object
type MemberReconciler ¶
type MemberReconciler struct {
// contains filtered or unexported fields
}
MemberReconciler reconciles a PartitionGroup object