reconciler

package
v0.0.0-...-069cba6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReconcilerHooks_GetCapabilities_FullMethodName = "/cnpgi.reconciler.v1.ReconcilerHooks/GetCapabilities"
	ReconcilerHooks_Pre_FullMethodName             = "/cnpgi.reconciler.v1.ReconcilerHooks/Pre"
	ReconcilerHooks_Post_FullMethodName            = "/cnpgi.reconciler.v1.ReconcilerHooks/Post"
)

Variables

View Source
var (
	ReconcilerHooksCapability_Kind_name = map[int32]string{
		0: "KIND_UNSPECIFIED",
		1: "KIND_CLUSTER",
		2: "KIND_BACKUP",
	}
	ReconcilerHooksCapability_Kind_value = map[string]int32{
		"KIND_UNSPECIFIED": 0,
		"KIND_CLUSTER":     1,
		"KIND_BACKUP":      2,
	}
)

Enum value maps for ReconcilerHooksCapability_Kind.

View Source
var (
	ReconcilerHooksResult_Behavior_name = map[int32]string{
		0: "BEHAVIOR_UNSPECIFIED",
		1: "BEHAVIOR_CONTINUE",
		2: "BEHAVIOR_REQUEUE",
		3: "BEHAVIOR_TERMINATE",
	}
	ReconcilerHooksResult_Behavior_value = map[string]int32{
		"BEHAVIOR_UNSPECIFIED": 0,
		"BEHAVIOR_CONTINUE":    1,
		"BEHAVIOR_REQUEUE":     2,
		"BEHAVIOR_TERMINATE":   3,
	}
)

Enum value maps for ReconcilerHooksResult_Behavior.

View Source
var File_proto_reconciler_proto protoreflect.FileDescriptor
View Source
var ReconcilerHooks_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cnpgi.reconciler.v1.ReconcilerHooks",
	HandlerType: (*ReconcilerHooksServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCapabilities",
			Handler:    _ReconcilerHooks_GetCapabilities_Handler,
		},
		{
			MethodName: "Pre",
			Handler:    _ReconcilerHooks_Pre_Handler,
		},
		{
			MethodName: "Post",
			Handler:    _ReconcilerHooks_Post_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/reconciler.proto",
}

ReconcilerHooks_ServiceDesc is the grpc.ServiceDesc for ReconcilerHooks service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterReconcilerHooksServer

func RegisterReconcilerHooksServer(s grpc.ServiceRegistrar, srv ReconcilerHooksServer)

Types

type ReconcilerHooksCapabilitiesRequest

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

func (*ReconcilerHooksCapabilitiesRequest) Descriptor deprecated

func (*ReconcilerHooksCapabilitiesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReconcilerHooksCapabilitiesRequest.ProtoReflect.Descriptor instead.

func (*ReconcilerHooksCapabilitiesRequest) ProtoMessage

func (*ReconcilerHooksCapabilitiesRequest) ProtoMessage()

func (*ReconcilerHooksCapabilitiesRequest) ProtoReflect

func (*ReconcilerHooksCapabilitiesRequest) Reset

func (*ReconcilerHooksCapabilitiesRequest) String

type ReconcilerHooksCapabilitiesResult

type ReconcilerHooksCapabilitiesResult struct {

	// This message is OPTIONAL, containing the list of resources
	// for which the lifecycle hook is called
	ReconcilerCapabilities []*ReconcilerHooksCapability `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ReconcilerHooksCapabilitiesResult) Descriptor deprecated

func (*ReconcilerHooksCapabilitiesResult) Descriptor() ([]byte, []int)

Deprecated: Use ReconcilerHooksCapabilitiesResult.ProtoReflect.Descriptor instead.

func (*ReconcilerHooksCapabilitiesResult) GetReconcilerCapabilities

func (x *ReconcilerHooksCapabilitiesResult) GetReconcilerCapabilities() []*ReconcilerHooksCapability

func (*ReconcilerHooksCapabilitiesResult) ProtoMessage

func (*ReconcilerHooksCapabilitiesResult) ProtoMessage()

func (*ReconcilerHooksCapabilitiesResult) ProtoReflect

func (*ReconcilerHooksCapabilitiesResult) Reset

func (*ReconcilerHooksCapabilitiesResult) String

type ReconcilerHooksCapability

type ReconcilerHooksCapability struct {

	// kind is the controller Kind
	Kind ReconcilerHooksCapability_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=cnpgi.reconciler.v1.ReconcilerHooksCapability_Kind" json:"kind,omitempty"`
	// contains filtered or unexported fields
}

func (*ReconcilerHooksCapability) Descriptor deprecated

func (*ReconcilerHooksCapability) Descriptor() ([]byte, []int)

Deprecated: Use ReconcilerHooksCapability.ProtoReflect.Descriptor instead.

func (*ReconcilerHooksCapability) GetKind

func (*ReconcilerHooksCapability) ProtoMessage

func (*ReconcilerHooksCapability) ProtoMessage()

func (*ReconcilerHooksCapability) ProtoReflect

func (*ReconcilerHooksCapability) Reset

func (x *ReconcilerHooksCapability) Reset()

func (*ReconcilerHooksCapability) String

func (x *ReconcilerHooksCapability) String() string

type ReconcilerHooksCapability_Kind

type ReconcilerHooksCapability_Kind int32
const (
	ReconcilerHooksCapability_KIND_UNSPECIFIED ReconcilerHooksCapability_Kind = 0
	// KIND_CLUSTER indicates that the plugin will plug the
	// Cluster reconciler
	ReconcilerHooksCapability_KIND_CLUSTER ReconcilerHooksCapability_Kind = 1
	// KIND_BACKUP indicates that the plugin will plug the
	// Backup reconciler
	ReconcilerHooksCapability_KIND_BACKUP ReconcilerHooksCapability_Kind = 2
)

func (ReconcilerHooksCapability_Kind) Descriptor

func (ReconcilerHooksCapability_Kind) Enum

func (ReconcilerHooksCapability_Kind) EnumDescriptor deprecated

func (ReconcilerHooksCapability_Kind) EnumDescriptor() ([]byte, []int)

Deprecated: Use ReconcilerHooksCapability_Kind.Descriptor instead.

func (ReconcilerHooksCapability_Kind) Number

func (ReconcilerHooksCapability_Kind) String

func (ReconcilerHooksCapability_Kind) Type

type ReconcilerHooksClient

type ReconcilerHooksClient interface {
	// GetCapabilities gets the capabilities of the Backup service
	GetCapabilities(ctx context.Context, in *ReconcilerHooksCapabilitiesRequest, opts ...grpc.CallOption) (*ReconcilerHooksCapabilitiesResult, error)
	// Pre is executed before the operator executes the reconciliation loop
	// It is a way for the plugins to directly execute changes on the resources
	// through the kube-api server.
	Pre(ctx context.Context, in *ReconcilerHooksRequest, opts ...grpc.CallOption) (*ReconcilerHooksResult, error)
	// Post is executed after the operator executes the reconciliation loop
	// It is a way for the plugins to directly execute changes on the resources
	// through the kube-api server.
	Post(ctx context.Context, in *ReconcilerHooksRequest, opts ...grpc.CallOption) (*ReconcilerHooksResult, error)
}

ReconcilerHooksClient is the client API for ReconcilerHooks service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ReconcilerHooksRequest

type ReconcilerHooksRequest struct {

	// This field is REQUIRED. Value of this field is the JSON
	// serialization of the Cluster tied to the `Kind` being reconciled
	ClusterDefinition []byte `protobuf:"bytes,1,opt,name=cluster_definition,json=clusterDefinition,proto3" json:"cluster_definition,omitempty"`
	// This field is REQUIRED. Value of this field is the JSON
	// serialization of the resource being reconciled. Please note that in case of Cluster Reconciliation, the
	// `resource_definition` will match the `cluster_definition`
	ResourceDefinition []byte `protobuf:"bytes,2,opt,name=resource_definition,json=resourceDefinition,proto3" json:"resource_definition,omitempty"`
	// contains filtered or unexported fields
}

func (*ReconcilerHooksRequest) Descriptor deprecated

func (*ReconcilerHooksRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReconcilerHooksRequest.ProtoReflect.Descriptor instead.

func (*ReconcilerHooksRequest) GetClusterDefinition

func (x *ReconcilerHooksRequest) GetClusterDefinition() []byte

func (*ReconcilerHooksRequest) GetResourceDefinition

func (x *ReconcilerHooksRequest) GetResourceDefinition() []byte

func (*ReconcilerHooksRequest) ProtoMessage

func (*ReconcilerHooksRequest) ProtoMessage()

func (*ReconcilerHooksRequest) ProtoReflect

func (x *ReconcilerHooksRequest) ProtoReflect() protoreflect.Message

func (*ReconcilerHooksRequest) Reset

func (x *ReconcilerHooksRequest) Reset()

func (*ReconcilerHooksRequest) String

func (x *ReconcilerHooksRequest) String() string

type ReconcilerHooksResult

type ReconcilerHooksResult struct {

	// This field is REQUIRED, and indicates the behavior that should
	// be used for the current reconciliation loop.
	Behavior ReconcilerHooksResult_Behavior `` /* 126-byte string literal not displayed */
	// This field is OPTIONAL. If true, the current reconciliation loop
	// will be stopped and the operator will ensure that another one will
	// be run in the requested number of seconds. IMPORTANT: the new
	// reconciliation loop may start even before the number of specified
	// seconds.
	RequeueAfter int64 `protobuf:"varint,2,opt,name=requeue_after,json=requeueAfter,proto3" json:"requeue_after,omitempty"`
	// contains filtered or unexported fields
}

ReconcilerHooksResult response is used to instruct then the CNPG controller on which action take after the plugin execution.

func (*ReconcilerHooksResult) Descriptor deprecated

func (*ReconcilerHooksResult) Descriptor() ([]byte, []int)

Deprecated: Use ReconcilerHooksResult.ProtoReflect.Descriptor instead.

func (*ReconcilerHooksResult) GetBehavior

func (*ReconcilerHooksResult) GetRequeueAfter

func (x *ReconcilerHooksResult) GetRequeueAfter() int64

func (*ReconcilerHooksResult) ProtoMessage

func (*ReconcilerHooksResult) ProtoMessage()

func (*ReconcilerHooksResult) ProtoReflect

func (x *ReconcilerHooksResult) ProtoReflect() protoreflect.Message

func (*ReconcilerHooksResult) Reset

func (x *ReconcilerHooksResult) Reset()

func (*ReconcilerHooksResult) String

func (x *ReconcilerHooksResult) String() string

type ReconcilerHooksResult_Behavior

type ReconcilerHooksResult_Behavior int32
const (
	ReconcilerHooksResult_BEHAVIOR_UNSPECIFIED ReconcilerHooksResult_Behavior = 0
	// BEHAVIOR_CONTINUE indicates that this reconciliation loop will
	// proceed running.
	// BEHAVIOR_CONTINUE is useful when the plugin executes changes on internal status or resources not directly managed
	// by the main reconciliation loop
	ReconcilerHooksResult_BEHAVIOR_CONTINUE ReconcilerHooksResult_Behavior = 1
	// BEHAVIOR_REQUEUE indicates that this reconciliation loop will
	// be stopped and a new one will be requested.
	// BEHAVIOR_REQUEUE should always be set when the plugin applies changes on resources that are directly managed
	// by the main reconciliation loop
	ReconcilerHooksResult_BEHAVIOR_REQUEUE ReconcilerHooksResult_Behavior = 2
	// BEHAVIOR_TERMINATE indicates that the main reconciliation loop needs to
	// be marked as succeeded and no further operations needs to be taken.
	// This should be used when the invoked Reconcile hook act as a substitute for the main CNPG reconciliation loop.
	// An example would be a plugin that substitutes the `Backup` logic of CNPG.
	ReconcilerHooksResult_BEHAVIOR_TERMINATE ReconcilerHooksResult_Behavior = 3
)

func (ReconcilerHooksResult_Behavior) Descriptor

func (ReconcilerHooksResult_Behavior) Enum

func (ReconcilerHooksResult_Behavior) EnumDescriptor deprecated

func (ReconcilerHooksResult_Behavior) EnumDescriptor() ([]byte, []int)

Deprecated: Use ReconcilerHooksResult_Behavior.Descriptor instead.

func (ReconcilerHooksResult_Behavior) Number

func (ReconcilerHooksResult_Behavior) String

func (ReconcilerHooksResult_Behavior) Type

type ReconcilerHooksServer

type ReconcilerHooksServer interface {
	// GetCapabilities gets the capabilities of the Backup service
	GetCapabilities(context.Context, *ReconcilerHooksCapabilitiesRequest) (*ReconcilerHooksCapabilitiesResult, error)
	// Pre is executed before the operator executes the reconciliation loop
	// It is a way for the plugins to directly execute changes on the resources
	// through the kube-api server.
	Pre(context.Context, *ReconcilerHooksRequest) (*ReconcilerHooksResult, error)
	// Post is executed after the operator executes the reconciliation loop
	// It is a way for the plugins to directly execute changes on the resources
	// through the kube-api server.
	Post(context.Context, *ReconcilerHooksRequest) (*ReconcilerHooksResult, error)
	// contains filtered or unexported methods
}

ReconcilerHooksServer is the server API for ReconcilerHooks service. All implementations must embed UnimplementedReconcilerHooksServer for forward compatibility

type UnimplementedReconcilerHooksServer

type UnimplementedReconcilerHooksServer struct {
}

UnimplementedReconcilerHooksServer must be embedded to have forward compatible implementations.

func (UnimplementedReconcilerHooksServer) Post

func (UnimplementedReconcilerHooksServer) Pre

type UnsafeReconcilerHooksServer

type UnsafeReconcilerHooksServer interface {
	// contains filtered or unexported methods
}

UnsafeReconcilerHooksServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ReconcilerHooksServer will result in compilation errors.

Jump to

Keyboard shortcuts

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