Documentation ¶
Index ¶
- Constants
- func GenerateCommandId(resetOffset *kafkav1alpha1.ResetOffset, podIP string, opCode ctrl.OpCode) (int64, error)
- func GenerateLockToken(reconcilerId types.UID, resetOffsetId types.UID) string
- func NewControllerFactory(refMapperFactory refmappers.ResetOffsetRefMapperFactory, ...) injection.ControllerConstructor
- func Shutdown()
- type CoreV1EventType
- type PartitionOffsetManagers
- type Reconciler
- type SaramaNewClientFnType
- type SaramaNewOffsetManagerFromClientFnType
Constants ¶
const Component = "reset-offset-controller"
Component For Sarama Config
Variables ¶
This section is empty.
Functions ¶
func GenerateCommandId ¶
func GenerateCommandId(resetOffset *kafkav1alpha1.ResetOffset, podIP string, opCode ctrl.OpCode) (int64, error)
GenerateCommandId returns an int64 hash based on the specified ResetOffset.
func GenerateLockToken ¶
GenerateLockToken returns a string representing a Lock.Token unique to the specified Reconciler and ResetOffset
func NewControllerFactory ¶
func NewControllerFactory( refMapperFactory refmappers.ResetOffsetRefMapperFactory, connectionPool ctrlreconciler.ControlPlaneConnectionPool) injection.ControllerConstructor
NewControllerFactory returns a ControllerConstructor function capable of creating a "typed" ResetOffset Controller
Types ¶
type CoreV1EventType ¶
type CoreV1EventType int
CoreV1EventType "Enum" Type
const ( ResetOffsetReconciled CoreV1EventType = iota ResetOffsetFinalized ResetOffsetSkipped )
CoreV1 EventType "Enum" Values For ResetOffset
func (CoreV1EventType) String ¶
func (et CoreV1EventType) String() string
CoreV1 EventType String Value
type PartitionOffsetManagers ¶
type PartitionOffsetManagers map[int32]sarama.PartitionOffsetManager
PartitionOffsetManagers is a map of Partition -> Sarama PartitionOffsetManager
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler Implements controller.Reconciler for ResetOffset Resources
func (*Reconciler) FinalizeKind ¶
func (r *Reconciler) FinalizeKind(ctx context.Context, resetOffset *kafkav1alpha1.ResetOffset) reconciler.Event
FinalizeKind implements the Finalizer Interface and is responsible for performing any necessary cleanup.
func (*Reconciler) ReconcileKind ¶
func (r *Reconciler) ReconcileKind(ctx context.Context, resetOffset *kafkav1alpha1.ResetOffset) reconciler.Event
ReconcileKind implements the Reconciler Interface and is responsible for performing Offset repositioning.
type SaramaNewClientFnType ¶
SaramaNewClientFnType defines the Sarama NewClient() function signature.
var SaramaNewClientFn SaramaNewClientFnType = sarama.NewClient
SaramaNewClientFn is a reference to the Sarama NewClient() function used when reconciling offsets which facilitates stubbing in unit tests.
type SaramaNewOffsetManagerFromClientFnType ¶
type SaramaNewOffsetManagerFromClientFnType func(group string, client sarama.Client) (sarama.OffsetManager, error)
SaramaNewOffsetManagerFromClientFnType defines the Sarama NewOffsetManagerFromClient() function signature.
var SaramaNewOffsetManagerFromClientFn SaramaNewOffsetManagerFromClientFnType = sarama.NewOffsetManagerFromClient
SaramaNewOffsetManagerFromClientFn is a reference to the Sarama NewOffsetManagerFromClient() function used when reconciling offsets which facilitates stubbing in unit tests.