common

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Overview

Package common is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	JobLifecycleManager = &jobLifecycleManager{}
)

Functions

func CondClusterIsDeleting

func CondClusterIsDeleting(ctx ClusterState) task.Condition

func CondClusterIsPaused

func CondClusterIsPaused(ctx ClusterState) task.Condition

func CondClusterIsSuspending

func CondClusterIsSuspending(ctx ClusterState) task.Condition

func CondClusterPDAddrIsNotRegistered

func CondClusterPDAddrIsNotRegistered(ctx ClusterState) task.Condition

func CondFeatureGatesIsNotSynced

func CondFeatureGatesIsNotSynced[
	S scope.Group[F, T],
	F client.Object,
	T runtime.Group,
](state ContextFeatureGates[F]) task.Condition

CondFeatureGatesIsNotSynced is defined to ensure features are synced before all actions

func CondObjectHasBeenDeleted

func CondObjectHasBeenDeleted[
	S scope.Object[F, T],
	F Object[O],
	T runtime.Object,
	O any,
](state ObjectState[F]) task.Condition

func CondObjectIsDeleting

func CondObjectIsDeleting[
	S scope.Object[F, T],
	F Object[O],
	T runtime.Object,
	O any,
](state ObjectState[F]) task.Condition

func CondObjectIsNotDeletingButOfflined

func CondObjectIsNotDeletingButOfflined[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](state ObjectState[F]) task.Condition

func IgnoreErrorf

func IgnoreErrorf(format string, a ...any) error

IgnoreErrorf returns a IgnoreError

func IsIgnoreError

func IsIgnoreError(err error) bool

IsIgnoreError returns whether err is a IgnoreError

func IsRequeueError

func IsRequeueError(err error) bool

IsRequeueError returns whether err is a RequeueError

func RequeueErrorf

func RequeueErrorf(duration time.Duration, format string, a ...any) error

RequeueErrorf returns a RequeueError

func TaskContextCluster

func TaskContextCluster[
	S scope.Object[F, T],
	F client.Object,
	T runtime.Object,
](state ContextClusterNewer[F], c client.Client) task.Task

func TaskContextObject

func TaskContextObject[
	S scope.Object[F, T],
	F Object[O],
	T runtime.Object,
	O any,
](state ContextObjectNewer[F], c client.Client) task.Task

func TaskContextPeerSlice

func TaskContextPeerSlice[
	S scope.InstanceList[F, T, L],
	F client.Object,
	T runtime.Instance,
	L client.ObjectList,
](state ContextSliceNewer[F, F], c client.Client) task.Task

TaskContextPeerSlice init peer instance slice in state by the instance

func TaskContextPod

func TaskContextPod[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](state ContextPodNewer[F], c client.Client) task.Task

func TaskContextSlice

func TaskContextSlice[
	S scope.GroupInstance[GF, GT, IS],
	IS scope.List[IL, I],
	GF client.Object,
	GT runtime.Group,
	IL client.ObjectList,
	I client.Object,
](state ContextSliceNewer[GF, I], c client.Client) task.Task

TaskContextSlice init instance slice in state by the group

func TaskDeleteOfflinedStore

func TaskDeleteOfflinedStore[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](state ObjectState[F], c client.Client) task.Task

func TaskFinalizerAdd

func TaskFinalizerAdd[
	S scope.Object[F, T],
	F Object[O],
	T runtime.Object,
	O any,
](state ObjectState[F], c client.Client) task.Task

func TaskGroupConditionReady

func TaskGroupConditionReady[
	S scope.GroupInstance[F, T, IS],
	IS scope.Instance[IF, IT],
	F client.Object,
	T runtime.Group,
	IF client.Object,
	IT runtime.Instance,
](state GroupCondReadyUpdater[F, IF]) task.Task

func TaskGroupConditionSuspended

func TaskGroupConditionSuspended[
	S scope.GroupInstance[F, T, IS],
	IS scope.Instance[IF, IT],
	F client.Object,
	T runtime.Group,
	IF client.Object,
	IT runtime.Instance,
](state GroupCondSuspendedUpdater[F, IF]) task.Task

func TaskGroupConditionSynced

func TaskGroupConditionSynced[
	S scope.GroupInstance[F, T, IS],
	IS scope.Instance[IF, IT],
	F client.Object,
	T runtime.Group,
	IF client.Object,
	IT runtime.Instance,
](state GroupCondSyncedUpdater[F, IF]) task.Task

func TaskGroupFinalizerAdd deprecated

func TaskGroupFinalizerAdd[
	GT runtime.GroupTuple[OG, RG],
	OG client.Object,
	RG runtime.Group,
](state GroupState[RG], c client.Client) task.Task

Deprecated: prefer TaskFinalizerAdd, remove it

func TaskGroupFinalizerDel

func TaskGroupFinalizerDel[
	S scope.Group[GF, GT],
	GF client.Object,
	GT runtime.Group,
	I client.Object,
](state GroupFinalizerDelState[GF, I], c client.Client) task.Task

func TaskGroupStatusSelector

func TaskGroupStatusSelector[
	S scope.Group[F, T],
	F client.Object,
	T runtime.Group,
](state GroupStatusSelectorUpdater[F]) task.Task

func TaskInstanceConditionOffline

func TaskInstanceConditionOffline[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](s InstanceCondOfflineUpdater[F]) task.Task

TaskInstanceConditionOffline set offline condition of an instance

func TaskInstanceConditionReady

func TaskInstanceConditionReady[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](state InstanceCondReadyUpdater[F]) task.Task

func TaskInstanceConditionRunning

func TaskInstanceConditionRunning[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](state InstanceCondRunningUpdater[F]) task.Task

func TaskInstanceConditionSuspended

func TaskInstanceConditionSuspended[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](state InstanceCondSuspendedUpdater[F]) task.Task

func TaskInstanceConditionSynced

func TaskInstanceConditionSynced[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](state InstanceCondSyncedUpdater[F]) task.Task

func TaskInstanceFinalizerAdd deprecated

func TaskInstanceFinalizerAdd[
	IT runtime.InstanceTuple[OI, RI],
	OI client.Object,
	RI runtime.Instance,
](state InstanceState[RI], c client.Client) task.Task

Deprecated: prefer TaskFinalizerAdd, remove it

func TaskJobFinalizerAdd

func TaskJobFinalizerAdd[
	J runtime.Job,
](state JobState[J], c client.Client) task.Task

func TaskJobFinalizerDel

func TaskJobFinalizerDel[
	J runtime.Job,
](state JobState[J], c client.Client) task.Task

func TaskOfflineStore

func TaskOfflineStore[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](
	ctx context.Context,
	c pdapi.PDClient,
	obj F,

	storeID string,
	state pdv1.NodeState,
) error

TaskOfflineStore tries to delete store or cancel store deletion

A: spec.offline - A1: spec.offline == false - A2: spec.offline == true B: state - B1: state == Preparing || state == Serving - B2: state == Removing - B3: state == Removed - B4: store does not exist 1. (A1, B1): do nothing, waiting for changes of spec.offline 2. (A2, B1): call delete store api 3. (A1, B2): call cancel api 4. (A2, B2): do nothing, waiting for changes of state 5. (A1, B3): do nothing, waiting for instance being removed 6. (A2, B3): do nothing, waiting for instance being removed 7. (A1, B4): do nothing, waiting for pod being created 8. (A2, B4): do nothing, waiting for instance being removed nolint:gocyclo // refactor later if necessary

func TaskPVC

func TaskPVC[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](state TaskPVCState[F], c client.Client, vm volumes.ModifierFactory, n PVCNewer[F]) task.Task

func TaskRevision

func TaskRevision[
	GT runtime.GroupTuple[OG, RG],
	OG client.Object,
	RG runtime.Group,
](state RevisionStateInitializer[RG], c client.Client) task.Task

func TaskServerLabels

func TaskServerLabels[
	S scope.Instance[F, T],
	F client.Object,
	T runtime.Instance,
](state ServerLabelsUpdater[F], c client.Client, setLabelsFunc func(context.Context, map[string]string) error) task.Task

func TaskStatusPersister

func TaskStatusPersister[
	S scope.Object[F, T],
	F client.Object,
	T runtime.Object,
](state StatusPersister[F], c client.Client) task.Task

func TaskStatusRevisionAndReplicas

func TaskStatusRevisionAndReplicas[
	S scope.GroupInstance[F, T, IS],
	IS scope.Instance[IF, IT],
	F client.Object,
	T runtime.Group,
	IF client.Object,
	IT runtime.Instance,
](state StatusRevisionAndReplicasUpdater[F, IF]) task.Task

func TaskSuspendPod

func TaskSuspendPod(state PodState, c client.Client) task.Task

func TaskTrack

func TaskTrack[
	S scope.Instance[F, T],
	F Object[P],
	T runtime.Instance,
	P any,
](state TrackState[F], t tracker.Tracker) task.Task

Types

type ClusterAndGroupAndInstanceSliceState

type ClusterAndGroupAndInstanceSliceState[
	G runtime.Group,
	I runtime.Instance,
] interface {
	ClusterState
	GroupState[G]
	InstanceSliceState[I]
}

type ClusterState

type ClusterState interface {
	Cluster() *v1alpha1.Cluster
}

type CollisionCountOption

type CollisionCountOption interface {
	CollisionCount() *int32
}

type ContextClusterNewer

type ContextClusterNewer[
	F client.Object,
] interface {
	ObjectState[F]
	SetCluster(c *v1alpha1.Cluster)
}

type ContextFeatureGates

type ContextFeatureGates[
	F client.Object,
] interface {
	ObjectState[F]
	ClusterState
}

type ContextObjectNewer

type ContextObjectNewer[
	F client.Object,
] interface {
	Key() types.NamespacedName
	SetObject(f F)
}

type ContextPodNewer

type ContextPodNewer[
	F client.Object,
] interface {
	ObjectState[F]
	SetPod(pod *corev1.Pod)
}

type ContextSliceNewer

type ContextSliceNewer[
	GF client.Object,
	IF client.Object,
] interface {
	ObjectState[GF]
	SetInstanceSlice(f []IF)
}

type CurrentRevisionOption

type CurrentRevisionOption interface {
	CurrentRevision() string
}

type GetOptions

type GetOptions interface {
	NamespaceOption
	NameOption
}

type GroupAndInstanceSliceAndRevisionState

type GroupAndInstanceSliceAndRevisionState[
	G runtime.Group,
	I runtime.Instance,
] interface {
	GroupState[G]
	InstanceSliceState[I]
	RevisionState
}

type GroupAndInstanceSliceState

type GroupAndInstanceSliceState[
	G runtime.Group,
	I runtime.Instance,
] interface {
	GroupState[G]
	InstanceSliceState[I]
}

type GroupCondReadyUpdater

type GroupCondReadyUpdater[
	G client.Object,
	I client.Object,
] interface {
	StatusUpdater
	SliceState[I]

	Object() G
}

type GroupCondSuspendedUpdater

type GroupCondSuspendedUpdater[
	G client.Object,
	I client.Object,
] interface {
	StatusUpdater
	ClusterState

	SliceState[I]

	Object() G
}

type GroupCondSyncedUpdater

type GroupCondSyncedUpdater[
	G client.Object,
	I client.Object,
] interface {
	StatusUpdater
	SliceState[I]
	RevisionState

	Object() G
}

type GroupFinalizerDelState

type GroupFinalizerDelState[
	GF client.Object,
	I client.Object,
] interface {
	ObjectState[GF]
	SliceState[I]
}

type GroupState

type GroupState[G runtime.Group] interface {
	Group() G
}

type GroupStatusSelectorUpdater

type GroupStatusSelectorUpdater[
	G client.Object,
] interface {
	StatusUpdater

	Object() G
}

type HealthyState

type HealthyState interface {
	// It means the instance is healthy to serve.
	// Normally, it's from PD or api exposed by the instance.
	// Now the operator checks it just like a liveness/readiness prober.
	// It may be removed if all components support /ready api in the future.
	// And then we can use pod's ready condition directly to check whether the instance
	// is ready.
	// But now, we still probe health from the operator.
	IsHealthy() bool
}

type HealthyStateUpdater

type HealthyStateUpdater interface {
	SetHealthy()
}

type IgnoreError

type IgnoreError struct {
	// contains filtered or unexported fields
}

IgnoreError is used to ignore this item, this error type shouldn't be considered as a real error, no need to requeue

func (*IgnoreError) Error

func (re *IgnoreError) Error() string

type InstanceAndPodState

type InstanceAndPodState[I runtime.Instance] interface {
	InstanceState[I]
	PodState
}

type InstanceCondOfflineUpdater

type InstanceCondOfflineUpdater[T client.Object] interface {
	StatusUpdater
	StoreState

	Object() T
}

type InstanceCondReadyUpdater

type InstanceCondReadyUpdater[T client.Object] interface {
	StatusUpdater
	PodState
	HealthyState
	Object() T
}

type InstanceCondRunningUpdater

type InstanceCondRunningUpdater[T client.Object] interface {
	StatusUpdater
	PodState
	Object() T
}

type InstanceCondSuspendedUpdater

type InstanceCondSuspendedUpdater[T client.Object] interface {
	StatusUpdater
	PodState
	ClusterState
	Object() T
}

type InstanceCondSyncedUpdater

type InstanceCondSyncedUpdater[T client.Object] interface {
	StatusUpdater
	PodState
	ClusterState
	Object() T
}

type InstanceSliceState

type InstanceSliceState[I runtime.Instance] interface {
	Slice() []I
}

type InstanceState

type InstanceState[I runtime.Instance] interface {
	Instance() I
}

type JobState

type JobState[J runtime.Job] interface {
	Job() J
}

type Labels

type Labels map[string]string

func (Labels) Labels

func (l Labels) Labels() map[string]string

type LabelsFunc

type LabelsFunc func() map[string]string

func (LabelsFunc) Labels

func (f LabelsFunc) Labels() map[string]string

type LabelsOption

type LabelsOption interface {
	Labels() map[string]string
}

type Lazy

type Lazy[T any] func() T

func (Lazy[T]) CollisionCount

func (f Lazy[T]) CollisionCount() T

func (Lazy[T]) CurrentRevision

func (f Lazy[T]) CurrentRevision() T

func (Lazy[T]) Labels

func (f Lazy[T]) Labels() T

func (Lazy[T]) Name

func (f Lazy[T]) Name() T

func (Lazy[T]) Namespace

func (f Lazy[T]) Namespace() T

func (Lazy[T]) Parent

func (f Lazy[T]) Parent() T

type ListOptions

type ListOptions interface {
	NamespaceOption
	LabelsOption
}

type MockGroupCondReadyUpdater

type MockGroupCondReadyUpdater[G client.Object, I client.Object] struct {
	// contains filtered or unexported fields
}

MockGroupCondReadyUpdater is a mock of GroupCondReadyUpdater interface.

func NewMockGroupCondReadyUpdater

func NewMockGroupCondReadyUpdater[G client.Object, I client.Object](ctrl *gomock.Controller) *MockGroupCondReadyUpdater[G, I]

NewMockGroupCondReadyUpdater creates a new mock instance.

func (*MockGroupCondReadyUpdater[G, I]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGroupCondReadyUpdater[G, I]) InstanceSlice

func (m *MockGroupCondReadyUpdater[G, I]) InstanceSlice() []I

InstanceSlice mocks base method.

func (*MockGroupCondReadyUpdater[G, I]) Object

func (m *MockGroupCondReadyUpdater[G, I]) Object() G

Object mocks base method.

func (*MockGroupCondReadyUpdater[G, I]) SetStatusChanged

func (m *MockGroupCondReadyUpdater[G, I]) SetStatusChanged()

SetStatusChanged mocks base method.

type MockGroupCondReadyUpdaterMockRecorder

type MockGroupCondReadyUpdaterMockRecorder[G client.Object, I client.Object] struct {
	// contains filtered or unexported fields
}

MockGroupCondReadyUpdaterMockRecorder is the mock recorder for MockGroupCondReadyUpdater.

func (*MockGroupCondReadyUpdaterMockRecorder[G, I]) InstanceSlice

func (mr *MockGroupCondReadyUpdaterMockRecorder[G, I]) InstanceSlice() *gomock.Call

InstanceSlice indicates an expected call of InstanceSlice.

func (*MockGroupCondReadyUpdaterMockRecorder[G, I]) Object

Object indicates an expected call of Object.

func (*MockGroupCondReadyUpdaterMockRecorder[G, I]) SetStatusChanged

func (mr *MockGroupCondReadyUpdaterMockRecorder[G, I]) SetStatusChanged() *gomock.Call

SetStatusChanged indicates an expected call of SetStatusChanged.

type MockGroupCondSuspendedUpdater

type MockGroupCondSuspendedUpdater[G client.Object, I client.Object] struct {
	// contains filtered or unexported fields
}

MockGroupCondSuspendedUpdater is a mock of GroupCondSuspendedUpdater interface.

func NewMockGroupCondSuspendedUpdater

func NewMockGroupCondSuspendedUpdater[G client.Object, I client.Object](ctrl *gomock.Controller) *MockGroupCondSuspendedUpdater[G, I]

NewMockGroupCondSuspendedUpdater creates a new mock instance.

func (*MockGroupCondSuspendedUpdater[G, I]) Cluster

func (m *MockGroupCondSuspendedUpdater[G, I]) Cluster() *v1alpha1.Cluster

Cluster mocks base method.

func (*MockGroupCondSuspendedUpdater[G, I]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGroupCondSuspendedUpdater[G, I]) InstanceSlice

func (m *MockGroupCondSuspendedUpdater[G, I]) InstanceSlice() []I

InstanceSlice mocks base method.

func (*MockGroupCondSuspendedUpdater[G, I]) Object

func (m *MockGroupCondSuspendedUpdater[G, I]) Object() G

Object mocks base method.

func (*MockGroupCondSuspendedUpdater[G, I]) SetStatusChanged

func (m *MockGroupCondSuspendedUpdater[G, I]) SetStatusChanged()

SetStatusChanged mocks base method.

type MockGroupCondSuspendedUpdaterMockRecorder

type MockGroupCondSuspendedUpdaterMockRecorder[G client.Object, I client.Object] struct {
	// contains filtered or unexported fields
}

MockGroupCondSuspendedUpdaterMockRecorder is the mock recorder for MockGroupCondSuspendedUpdater.

func (*MockGroupCondSuspendedUpdaterMockRecorder[G, I]) Cluster

Cluster indicates an expected call of Cluster.

func (*MockGroupCondSuspendedUpdaterMockRecorder[G, I]) InstanceSlice

func (mr *MockGroupCondSuspendedUpdaterMockRecorder[G, I]) InstanceSlice() *gomock.Call

InstanceSlice indicates an expected call of InstanceSlice.

func (*MockGroupCondSuspendedUpdaterMockRecorder[G, I]) Object

Object indicates an expected call of Object.

func (*MockGroupCondSuspendedUpdaterMockRecorder[G, I]) SetStatusChanged

func (mr *MockGroupCondSuspendedUpdaterMockRecorder[G, I]) SetStatusChanged() *gomock.Call

SetStatusChanged indicates an expected call of SetStatusChanged.

type MockGroupCondSyncedUpdater

type MockGroupCondSyncedUpdater[G client.Object, I client.Object] struct {
	// contains filtered or unexported fields
}

MockGroupCondSyncedUpdater is a mock of GroupCondSyncedUpdater interface.

func NewMockGroupCondSyncedUpdater

func NewMockGroupCondSyncedUpdater[G client.Object, I client.Object](ctrl *gomock.Controller) *MockGroupCondSyncedUpdater[G, I]

NewMockGroupCondSyncedUpdater creates a new mock instance.

func (*MockGroupCondSyncedUpdater[G, I]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGroupCondSyncedUpdater[G, I]) InstanceSlice

func (m *MockGroupCondSyncedUpdater[G, I]) InstanceSlice() []I

InstanceSlice mocks base method.

func (*MockGroupCondSyncedUpdater[G, I]) Object

func (m *MockGroupCondSyncedUpdater[G, I]) Object() G

Object mocks base method.

func (*MockGroupCondSyncedUpdater[G, I]) Revision

func (m *MockGroupCondSyncedUpdater[G, I]) Revision() (string, string, int32)

Revision mocks base method.

func (*MockGroupCondSyncedUpdater[G, I]) SetStatusChanged

func (m *MockGroupCondSyncedUpdater[G, I]) SetStatusChanged()

SetStatusChanged mocks base method.

type MockGroupCondSyncedUpdaterMockRecorder

type MockGroupCondSyncedUpdaterMockRecorder[G client.Object, I client.Object] struct {
	// contains filtered or unexported fields
}

MockGroupCondSyncedUpdaterMockRecorder is the mock recorder for MockGroupCondSyncedUpdater.

func (*MockGroupCondSyncedUpdaterMockRecorder[G, I]) InstanceSlice

func (mr *MockGroupCondSyncedUpdaterMockRecorder[G, I]) InstanceSlice() *gomock.Call

InstanceSlice indicates an expected call of InstanceSlice.

func (*MockGroupCondSyncedUpdaterMockRecorder[G, I]) Object

Object indicates an expected call of Object.

func (*MockGroupCondSyncedUpdaterMockRecorder[G, I]) Revision

func (mr *MockGroupCondSyncedUpdaterMockRecorder[G, I]) Revision() *gomock.Call

Revision indicates an expected call of Revision.

func (*MockGroupCondSyncedUpdaterMockRecorder[G, I]) SetStatusChanged

func (mr *MockGroupCondSyncedUpdaterMockRecorder[G, I]) SetStatusChanged() *gomock.Call

SetStatusChanged indicates an expected call of SetStatusChanged.

type MockGroupStatusSelectorUpdater

type MockGroupStatusSelectorUpdater[G client.Object] struct {
	// contains filtered or unexported fields
}

MockGroupStatusSelectorUpdater is a mock of GroupStatusSelectorUpdater interface.

func NewMockGroupStatusSelectorUpdater

func NewMockGroupStatusSelectorUpdater[G client.Object](ctrl *gomock.Controller) *MockGroupStatusSelectorUpdater[G]

NewMockGroupStatusSelectorUpdater creates a new mock instance.

func (*MockGroupStatusSelectorUpdater[G]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGroupStatusSelectorUpdater[G]) Object

func (m *MockGroupStatusSelectorUpdater[G]) Object() G

Object mocks base method.

func (*MockGroupStatusSelectorUpdater[G]) SetStatusChanged

func (m *MockGroupStatusSelectorUpdater[G]) SetStatusChanged()

SetStatusChanged mocks base method.

type MockGroupStatusSelectorUpdaterMockRecorder

type MockGroupStatusSelectorUpdaterMockRecorder[G client.Object] struct {
	// contains filtered or unexported fields
}

MockGroupStatusSelectorUpdaterMockRecorder is the mock recorder for MockGroupStatusSelectorUpdater.

func (*MockGroupStatusSelectorUpdaterMockRecorder[G]) Object

Object indicates an expected call of Object.

func (*MockGroupStatusSelectorUpdaterMockRecorder[G]) SetStatusChanged

func (mr *MockGroupStatusSelectorUpdaterMockRecorder[G]) SetStatusChanged() *gomock.Call

SetStatusChanged indicates an expected call of SetStatusChanged.

type MockInstanceCondOfflineUpdater

type MockInstanceCondOfflineUpdater[T client.Object] struct {
	// contains filtered or unexported fields
}

MockInstanceCondOfflineUpdater is a mock of InstanceCondOfflineUpdater interface.

func NewMockInstanceCondOfflineUpdater

func NewMockInstanceCondOfflineUpdater[T client.Object](ctrl *gomock.Controller) *MockInstanceCondOfflineUpdater[T]

NewMockInstanceCondOfflineUpdater creates a new mock instance.

func (*MockInstanceCondOfflineUpdater[T]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInstanceCondOfflineUpdater[T]) GetLeaderCount

func (m *MockInstanceCondOfflineUpdater[T]) GetLeaderCount() int

GetLeaderCount mocks base method.

func (*MockInstanceCondOfflineUpdater[T]) GetRegionCount

func (m *MockInstanceCondOfflineUpdater[T]) GetRegionCount() int

GetRegionCount mocks base method.

func (*MockInstanceCondOfflineUpdater[T]) GetStoreState

func (m *MockInstanceCondOfflineUpdater[T]) GetStoreState() v1.NodeState

GetStoreState mocks base method.

func (*MockInstanceCondOfflineUpdater[T]) IsStoreBusy

func (m *MockInstanceCondOfflineUpdater[T]) IsStoreBusy() bool

IsStoreBusy mocks base method.

func (*MockInstanceCondOfflineUpdater[T]) IsStoreUp

func (m *MockInstanceCondOfflineUpdater[T]) IsStoreUp() bool

IsStoreUp mocks base method.

func (*MockInstanceCondOfflineUpdater[T]) Object

func (m *MockInstanceCondOfflineUpdater[T]) Object() T

Object mocks base method.

func (*MockInstanceCondOfflineUpdater[T]) SetStatusChanged

func (m *MockInstanceCondOfflineUpdater[T]) SetStatusChanged()

SetStatusChanged mocks base method.

type MockInstanceCondOfflineUpdaterMockRecorder

type MockInstanceCondOfflineUpdaterMockRecorder[T client.Object] struct {
	// contains filtered or unexported fields
}

MockInstanceCondOfflineUpdaterMockRecorder is the mock recorder for MockInstanceCondOfflineUpdater.

func (*MockInstanceCondOfflineUpdaterMockRecorder[T]) GetLeaderCount

func (mr *MockInstanceCondOfflineUpdaterMockRecorder[T]) GetLeaderCount() *gomock.Call

GetLeaderCount indicates an expected call of GetLeaderCount.

func (*MockInstanceCondOfflineUpdaterMockRecorder[T]) GetRegionCount

func (mr *MockInstanceCondOfflineUpdaterMockRecorder[T]) GetRegionCount() *gomock.Call

GetRegionCount indicates an expected call of GetRegionCount.

func (*MockInstanceCondOfflineUpdaterMockRecorder[T]) GetStoreState

func (mr *MockInstanceCondOfflineUpdaterMockRecorder[T]) GetStoreState() *gomock.Call

GetStoreState indicates an expected call of GetStoreState.

func (*MockInstanceCondOfflineUpdaterMockRecorder[T]) IsStoreBusy

IsStoreBusy indicates an expected call of IsStoreBusy.

func (*MockInstanceCondOfflineUpdaterMockRecorder[T]) IsStoreUp

IsStoreUp indicates an expected call of IsStoreUp.

func (*MockInstanceCondOfflineUpdaterMockRecorder[T]) Object

Object indicates an expected call of Object.

func (*MockInstanceCondOfflineUpdaterMockRecorder[T]) SetStatusChanged

func (mr *MockInstanceCondOfflineUpdaterMockRecorder[T]) SetStatusChanged() *gomock.Call

SetStatusChanged indicates an expected call of SetStatusChanged.

type MockInstanceCondReadyUpdater

type MockInstanceCondReadyUpdater[T client.Object] struct {
	// contains filtered or unexported fields
}

MockInstanceCondReadyUpdater is a mock of InstanceCondReadyUpdater interface.

func NewMockInstanceCondReadyUpdater

func NewMockInstanceCondReadyUpdater[T client.Object](ctrl *gomock.Controller) *MockInstanceCondReadyUpdater[T]

NewMockInstanceCondReadyUpdater creates a new mock instance.

func (*MockInstanceCondReadyUpdater[T]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInstanceCondReadyUpdater[T]) IsHealthy

func (m *MockInstanceCondReadyUpdater[T]) IsHealthy() bool

IsHealthy mocks base method.

func (*MockInstanceCondReadyUpdater[T]) IsPodTerminating

func (m *MockInstanceCondReadyUpdater[T]) IsPodTerminating() bool

IsPodTerminating mocks base method.

func (*MockInstanceCondReadyUpdater[T]) Object

func (m *MockInstanceCondReadyUpdater[T]) Object() T

Object mocks base method.

func (*MockInstanceCondReadyUpdater[T]) Pod

func (m *MockInstanceCondReadyUpdater[T]) Pod() *v10.Pod

Pod mocks base method.

func (*MockInstanceCondReadyUpdater[T]) SetStatusChanged

func (m *MockInstanceCondReadyUpdater[T]) SetStatusChanged()

SetStatusChanged mocks base method.

type MockInstanceCondReadyUpdaterMockRecorder

type MockInstanceCondReadyUpdaterMockRecorder[T client.Object] struct {
	// contains filtered or unexported fields
}

MockInstanceCondReadyUpdaterMockRecorder is the mock recorder for MockInstanceCondReadyUpdater.

func (*MockInstanceCondReadyUpdaterMockRecorder[T]) IsHealthy

IsHealthy indicates an expected call of IsHealthy.

func (*MockInstanceCondReadyUpdaterMockRecorder[T]) IsPodTerminating

func (mr *MockInstanceCondReadyUpdaterMockRecorder[T]) IsPodTerminating() *gomock.Call

IsPodTerminating indicates an expected call of IsPodTerminating.

func (*MockInstanceCondReadyUpdaterMockRecorder[T]) Object

Object indicates an expected call of Object.

func (*MockInstanceCondReadyUpdaterMockRecorder[T]) Pod

Pod indicates an expected call of Pod.

func (*MockInstanceCondReadyUpdaterMockRecorder[T]) SetStatusChanged

func (mr *MockInstanceCondReadyUpdaterMockRecorder[T]) SetStatusChanged() *gomock.Call

SetStatusChanged indicates an expected call of SetStatusChanged.

type MockInstanceCondSuspendedUpdater

type MockInstanceCondSuspendedUpdater[T client.Object] struct {
	// contains filtered or unexported fields
}

MockInstanceCondSuspendedUpdater is a mock of InstanceCondSuspendedUpdater interface.

func NewMockInstanceCondSuspendedUpdater

func NewMockInstanceCondSuspendedUpdater[T client.Object](ctrl *gomock.Controller) *MockInstanceCondSuspendedUpdater[T]

NewMockInstanceCondSuspendedUpdater creates a new mock instance.

func (*MockInstanceCondSuspendedUpdater[T]) Cluster

Cluster mocks base method.

func (*MockInstanceCondSuspendedUpdater[T]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInstanceCondSuspendedUpdater[T]) IsPodTerminating

func (m *MockInstanceCondSuspendedUpdater[T]) IsPodTerminating() bool

IsPodTerminating mocks base method.

func (*MockInstanceCondSuspendedUpdater[T]) Object

func (m *MockInstanceCondSuspendedUpdater[T]) Object() T

Object mocks base method.

func (*MockInstanceCondSuspendedUpdater[T]) Pod

Pod mocks base method.

func (*MockInstanceCondSuspendedUpdater[T]) SetStatusChanged

func (m *MockInstanceCondSuspendedUpdater[T]) SetStatusChanged()

SetStatusChanged mocks base method.

type MockInstanceCondSuspendedUpdaterMockRecorder

type MockInstanceCondSuspendedUpdaterMockRecorder[T client.Object] struct {
	// contains filtered or unexported fields
}

MockInstanceCondSuspendedUpdaterMockRecorder is the mock recorder for MockInstanceCondSuspendedUpdater.

func (*MockInstanceCondSuspendedUpdaterMockRecorder[T]) Cluster

Cluster indicates an expected call of Cluster.

func (*MockInstanceCondSuspendedUpdaterMockRecorder[T]) IsPodTerminating

func (mr *MockInstanceCondSuspendedUpdaterMockRecorder[T]) IsPodTerminating() *gomock.Call

IsPodTerminating indicates an expected call of IsPodTerminating.

func (*MockInstanceCondSuspendedUpdaterMockRecorder[T]) Object

Object indicates an expected call of Object.

func (*MockInstanceCondSuspendedUpdaterMockRecorder[T]) Pod

Pod indicates an expected call of Pod.

func (*MockInstanceCondSuspendedUpdaterMockRecorder[T]) SetStatusChanged

func (mr *MockInstanceCondSuspendedUpdaterMockRecorder[T]) SetStatusChanged() *gomock.Call

SetStatusChanged indicates an expected call of SetStatusChanged.

type MockInstanceCondSyncedUpdater

type MockInstanceCondSyncedUpdater[T client.Object] struct {
	// contains filtered or unexported fields
}

MockInstanceCondSyncedUpdater is a mock of InstanceCondSyncedUpdater interface.

func NewMockInstanceCondSyncedUpdater

func NewMockInstanceCondSyncedUpdater[T client.Object](ctrl *gomock.Controller) *MockInstanceCondSyncedUpdater[T]

NewMockInstanceCondSyncedUpdater creates a new mock instance.

func (*MockInstanceCondSyncedUpdater[T]) Cluster

Cluster mocks base method.

func (*MockInstanceCondSyncedUpdater[T]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInstanceCondSyncedUpdater[T]) IsPodTerminating

func (m *MockInstanceCondSyncedUpdater[T]) IsPodTerminating() bool

IsPodTerminating mocks base method.

func (*MockInstanceCondSyncedUpdater[T]) Object

func (m *MockInstanceCondSyncedUpdater[T]) Object() T

Object mocks base method.

func (*MockInstanceCondSyncedUpdater[T]) Pod

func (m *MockInstanceCondSyncedUpdater[T]) Pod() *v10.Pod

Pod mocks base method.

func (*MockInstanceCondSyncedUpdater[T]) SetStatusChanged

func (m *MockInstanceCondSyncedUpdater[T]) SetStatusChanged()

SetStatusChanged mocks base method.

type MockInstanceCondSyncedUpdaterMockRecorder

type MockInstanceCondSyncedUpdaterMockRecorder[T client.Object] struct {
	// contains filtered or unexported fields
}

MockInstanceCondSyncedUpdaterMockRecorder is the mock recorder for MockInstanceCondSyncedUpdater.

func (*MockInstanceCondSyncedUpdaterMockRecorder[T]) Cluster

Cluster indicates an expected call of Cluster.

func (*MockInstanceCondSyncedUpdaterMockRecorder[T]) IsPodTerminating

func (mr *MockInstanceCondSyncedUpdaterMockRecorder[T]) IsPodTerminating() *gomock.Call

IsPodTerminating indicates an expected call of IsPodTerminating.

func (*MockInstanceCondSyncedUpdaterMockRecorder[T]) Object

Object indicates an expected call of Object.

func (*MockInstanceCondSyncedUpdaterMockRecorder[T]) Pod

Pod indicates an expected call of Pod.

func (*MockInstanceCondSyncedUpdaterMockRecorder[T]) SetStatusChanged

func (mr *MockInstanceCondSyncedUpdaterMockRecorder[T]) SetStatusChanged() *gomock.Call

SetStatusChanged indicates an expected call of SetStatusChanged.

type MockStatusPersister

type MockStatusPersister[T client.Object] struct {
	// contains filtered or unexported fields
}

MockStatusPersister is a mock of StatusPersister interface.

func NewMockStatusPersister

func NewMockStatusPersister[T client.Object](ctrl *gomock.Controller) *MockStatusPersister[T]

NewMockStatusPersister creates a new mock instance.

func (*MockStatusPersister[T]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStatusPersister[T]) IsStatusChanged

func (m *MockStatusPersister[T]) IsStatusChanged() bool

IsStatusChanged mocks base method.

func (*MockStatusPersister[T]) Object

func (m *MockStatusPersister[T]) Object() T

Object mocks base method.

type MockStatusPersisterMockRecorder

type MockStatusPersisterMockRecorder[T client.Object] struct {
	// contains filtered or unexported fields
}

MockStatusPersisterMockRecorder is the mock recorder for MockStatusPersister.

func (*MockStatusPersisterMockRecorder[T]) IsStatusChanged

func (mr *MockStatusPersisterMockRecorder[T]) IsStatusChanged() *gomock.Call

IsStatusChanged indicates an expected call of IsStatusChanged.

func (*MockStatusPersisterMockRecorder[T]) Object

func (mr *MockStatusPersisterMockRecorder[T]) Object() *gomock.Call

Object indicates an expected call of Object.

type MockStatusRevisionAndReplicasUpdater

type MockStatusRevisionAndReplicasUpdater[G client.Object, I client.Object] struct {
	// contains filtered or unexported fields
}

MockStatusRevisionAndReplicasUpdater is a mock of StatusRevisionAndReplicasUpdater interface.

func NewMockStatusRevisionAndReplicasUpdater

func NewMockStatusRevisionAndReplicasUpdater[G client.Object, I client.Object](ctrl *gomock.Controller) *MockStatusRevisionAndReplicasUpdater[G, I]

NewMockStatusRevisionAndReplicasUpdater creates a new mock instance.

func (*MockStatusRevisionAndReplicasUpdater[G, I]) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStatusRevisionAndReplicasUpdater[G, I]) InstanceSlice

func (m *MockStatusRevisionAndReplicasUpdater[G, I]) InstanceSlice() []I

InstanceSlice mocks base method.

func (*MockStatusRevisionAndReplicasUpdater[G, I]) Object

func (m *MockStatusRevisionAndReplicasUpdater[G, I]) Object() G

Object mocks base method.

func (*MockStatusRevisionAndReplicasUpdater[G, I]) Revision

func (m *MockStatusRevisionAndReplicasUpdater[G, I]) Revision() (string, string, int32)

Revision mocks base method.

func (*MockStatusRevisionAndReplicasUpdater[G, I]) SetStatusChanged

func (m *MockStatusRevisionAndReplicasUpdater[G, I]) SetStatusChanged()

SetStatusChanged mocks base method.

type MockStatusRevisionAndReplicasUpdaterMockRecorder

type MockStatusRevisionAndReplicasUpdaterMockRecorder[G client.Object, I client.Object] struct {
	// contains filtered or unexported fields
}

MockStatusRevisionAndReplicasUpdaterMockRecorder is the mock recorder for MockStatusRevisionAndReplicasUpdater.

func (*MockStatusRevisionAndReplicasUpdaterMockRecorder[G, I]) InstanceSlice

InstanceSlice indicates an expected call of InstanceSlice.

func (*MockStatusRevisionAndReplicasUpdaterMockRecorder[G, I]) Object

Object indicates an expected call of Object.

func (*MockStatusRevisionAndReplicasUpdaterMockRecorder[G, I]) Revision

Revision indicates an expected call of Revision.

func (*MockStatusRevisionAndReplicasUpdaterMockRecorder[G, I]) SetStatusChanged

func (mr *MockStatusRevisionAndReplicasUpdaterMockRecorder[G, I]) SetStatusChanged() *gomock.Call

SetStatusChanged indicates an expected call of SetStatusChanged.

type Name

type Name string

func (Name) Name

func (n Name) Name() string

type NameOption

type NameOption interface {
	Name() string
}

type Namespace

type Namespace string

func (Namespace) Namespace

func (n Namespace) Namespace() string

type NamespaceOption

type NamespaceOption interface {
	Namespace() string
}

type Object

type Object[T any] interface {
	client.Object
	*T
}

type ObjectList

type ObjectList[T any] interface {
	client.ObjectList
	*T
}

type ObjectState

type ObjectState[
	F client.Object,
] interface {
	Object() F
}

type PDGroupState

type PDGroupState interface {
	PDGroup() *v1alpha1.PDGroup
}

type PDSliceInitializer

type PDSliceInitializer = ResourceSliceInitializer[v1alpha1.PD]

type PDSliceState

type PDSliceState interface {
	PDSlice() []*v1alpha1.PD
}

type PDSliceStateInitializer

type PDSliceStateInitializer interface {
	PDSliceInitializer() PDSliceInitializer
}

type PDState

type PDState interface {
	PD() *v1alpha1.PD
}

type PVCNewer

type PVCNewer[F client.Object] interface {
	NewPVCs(c *v1alpha1.Cluster, obj F, fg features.Gates) []*corev1.PersistentVolumeClaim
}

type PVCNewerFunc

type PVCNewerFunc[F client.Object] func(c *v1alpha1.Cluster, obj F, fg features.Gates) []*corev1.PersistentVolumeClaim

func (PVCNewerFunc[F]) NewPVCs

func (f PVCNewerFunc[F]) NewPVCs(c *v1alpha1.Cluster, obj F, fg features.Gates) []*corev1.PersistentVolumeClaim

type ParentOption

type ParentOption[G runtime.Group] interface {
	Parent() G
}

type PodState

type PodState interface {
	Pod() *corev1.Pod
	IsPodTerminating() bool
}

type PodStateUpdater

type PodStateUpdater interface {
	// It will be called after get or update api calls to k8s
	SetPod(pod *corev1.Pod)
	// Pod cannot be updated when call DELETE API, so we have to mark pod is deleting after calling DELETE api
	DeletePod(pod *corev1.Pod)
}

type RequeueError

type RequeueError struct {
	Duration time.Duration
	// contains filtered or unexported fields
}

RequeueError is used to requeue the item, this error type should't be considered as a real error

func (*RequeueError) Error

func (re *RequeueError) Error() string

type Resource

type Resource[T any] interface {
	WithNamespace(NamespaceOption) Resource[T]
	WithName(NameOption) Resource[T]
	Initializer() ResourceInitializer[T]
}

func NewResource

func NewResource[T any](setter SetFunc[*T]) Resource[T]

type ResourceInitializer

type ResourceInitializer[T any] interface {
	GetOptions
	Setter[*T]
}

type ResourceSlice

type ResourceSlice[T any] interface {
	WithNamespace(NamespaceOption) ResourceSlice[T]
	WithLabels(LabelsOption) ResourceSlice[T]
	Initializer() ResourceSliceInitializer[T]
}

func NewResourceSlice

func NewResourceSlice[T any](setter SetFunc[[]*T]) ResourceSlice[T]

type ResourceSliceInitializer

type ResourceSliceInitializer[T any] interface {
	ListOptions
	Setter[[]*T]
}

type Revision

type Revision[G runtime.Group] interface {
	WithCurrentRevision(CurrentRevisionOption) Revision[G]
	WithCollisionCount(CollisionCountOption) Revision[G]
	WithParent(ParentOption[G]) Revision[G]
	WithLabels(LabelsOption) Revision[G]
	Initializer() RevisionInitializer[G]
}

func NewRevision

func NewRevision[G runtime.Group](setter RevisionSetter) Revision[G]

type RevisionInitializer

type RevisionInitializer[G runtime.Group] interface {
	LabelsOption
	ParentOption[G]
	CurrentRevision() string
	CollisionCount() *int32
	RevisionSetter
}

type RevisionSetter

type RevisionSetter interface {
	Set(update, current string, collisionCount int32)
}

type RevisionSetterFunc

type RevisionSetterFunc func(update, current string, collisionCount int32)

func (RevisionSetterFunc) Set

func (f RevisionSetterFunc) Set(update, current string, collisionCount int32)

type RevisionState

type RevisionState interface {
	Revision() (update, current string, collisionCount int32)
}

type RevisionStateInitializer

type RevisionStateInitializer[G runtime.Group] interface {
	RevisionInitializer() RevisionInitializer[G]
}

type ServerLabelsState

type ServerLabelsState interface {
	GetServerLabels() map[string]string
}

type SetFunc

type SetFunc[T any] func(T)

func (SetFunc[T]) Set

func (f SetFunc[T]) Set(obj T)

type Setter

type Setter[T any] interface {
	Set(T)
}

type SliceState

type SliceState[
	F client.Object,
] interface {
	InstanceSlice() []F
}

type StatusPersister

type StatusPersister[T client.Object] interface {
	Object() T
	IsStatusChanged() bool
}

type StatusRevisionAndReplicasUpdater

type StatusRevisionAndReplicasUpdater[
	G client.Object,
	I client.Object,
] interface {
	StatusUpdater
	SliceState[I]
	RevisionState

	Object() G
}

type StatusUpdater

type StatusUpdater interface {
	SetStatusChanged()
}

type StoreState

type StoreState interface {
	GetStoreState() pdv1.NodeState
	// IsStoreUp returns true if the store state is `Preparing` or `Serving`,
	// which means the store is in the state of providing services.
	IsStoreUp() bool
	// IsStoreBusy returns false if the proportion of regions that are ready exceeds 99%.
	IsStoreBusy() bool
	GetLeaderCount() int
	GetRegionCount() int
}

type StoreStateUpdater

type StoreStateUpdater interface {
	SetStoreState(pdv1.NodeState)
	SetLeaderCount(int)
	SetRegionCount(int)
	SetStoreBusy(bool)
}

type TaskPVCState

type TaskPVCState[F client.Object] interface {
	stateutil.ICluster
	stateutil.IObject[F]
	stateutil.IFeatureGates
}

type TiCDCGroupState

type TiCDCGroupState interface {
	TiCDCGroup() *v1alpha1.TiCDCGroup
}

type TiCDCSliceInitializer

type TiCDCSliceInitializer = ResourceSliceInitializer[v1alpha1.TiCDC]

type TiCDCSliceState

type TiCDCSliceState interface {
	TiCDCSlice() []*v1alpha1.TiCDC
}

type TiCDCSliceStateInitializer

type TiCDCSliceStateInitializer interface {
	TiCDCSliceInitializer() TiCDCSliceInitializer
}

type TiCDCState

type TiCDCState interface {
	TiCDC() *v1alpha1.TiCDC
}

type TiDBGroupState

type TiDBGroupState interface {
	TiDBGroup() *v1alpha1.TiDBGroup
}

type TiDBSliceInitializer

type TiDBSliceInitializer = ResourceSliceInitializer[v1alpha1.TiDB]

type TiDBSliceState

type TiDBSliceState interface {
	TiDBSlice() []*v1alpha1.TiDB
}

type TiDBSliceStateInitializer

type TiDBSliceStateInitializer interface {
	TiDBSliceInitializer() TiDBSliceInitializer
}

type TiDBState

type TiDBState interface {
	TiDB() *v1alpha1.TiDB
}

type TiFlashGroupState

type TiFlashGroupState interface {
	TiFlashGroup() *v1alpha1.TiFlashGroup
}

type TiFlashSliceInitializer

type TiFlashSliceInitializer = ResourceSliceInitializer[v1alpha1.TiFlash]

type TiFlashSliceState

type TiFlashSliceState interface {
	TiFlashSlice() []*v1alpha1.TiFlash
}

type TiFlashSliceStateInitializer

type TiFlashSliceStateInitializer interface {
	TiFlashSliceInitializer() TiFlashSliceInitializer
}

type TiFlashState

type TiFlashState interface {
	TiFlash() *v1alpha1.TiFlash
}

type TiKVGroupState

type TiKVGroupState interface {
	TiKVGroup() *v1alpha1.TiKVGroup
}

type TiKVSliceInitializer

type TiKVSliceInitializer = ResourceSliceInitializer[v1alpha1.TiKV]

type TiKVSliceState

type TiKVSliceState interface {
	TiKVSlice() []*v1alpha1.TiKV
}

type TiKVSliceStateInitializer

type TiKVSliceStateInitializer interface {
	TiKVSliceInitializer() TiKVSliceInitializer
}

type TiKVState

type TiKVState interface {
	TiKV() *v1alpha1.TiKV
}

type TiProxyGroupState

type TiProxyGroupState interface {
	TiProxyGroup() *v1alpha1.TiProxyGroup
}

type TiProxySliceInitializer

type TiProxySliceInitializer = ResourceSliceInitializer[v1alpha1.TiProxy]

type TiProxySliceState

type TiProxySliceState interface {
	TiProxySlice() []*v1alpha1.TiProxy
}

type TiProxySliceStateInitializer

type TiProxySliceStateInitializer interface {
	TiProxySliceInitializer() TiProxySliceInitializer
}

type TiProxyState

type TiProxyState interface {
	TiProxy() *v1alpha1.TiProxy
}

type TrackState

type TrackState[F client.Object] interface {
	Key() types.NamespacedName
	ObjectState[F]
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL