target

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	MirrorTargetPhasePending      = mirrv1.MirrorTargetPending
	MirrorTargetPhaseConnected    = mirrv1.MirrorTargetConnected
	MirrorTargetPhaseDisconnected = mirrv1.MirrorTargetDisconnected
	MirrorTargetPhaseUnknown      = mirrv1.MirrorTargetUnknown
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MirrorTarget

type MirrorTarget = mirrv1.ValdMirrorTarget

func NewMirrorTargetTemplate

func NewMirrorTargetTemplate(opts ...MirrorTargetOption) (*MirrorTarget, error)

type MirrorTargetOption

type MirrorTargetOption func(*MirrorTarget) error

func WithMirrorTargetColocation

func WithMirrorTargetColocation(n string) MirrorTargetOption

func WithMirrorTargetHost

func WithMirrorTargetHost(n string) MirrorTargetOption

func WithMirrorTargetLabels

func WithMirrorTargetLabels(labels map[string]string) MirrorTargetOption

func WithMirrorTargetName

func WithMirrorTargetName(name string) MirrorTargetOption

func WithMirrorTargetNamespace

func WithMirrorTargetNamespace(ns string) MirrorTargetOption

func WithMirrorTargetPort

func WithMirrorTargetPort(port int) MirrorTargetOption

func WithMirrorTargetStatus

func WithMirrorTargetStatus(st *MirrorTargetStatus) MirrorTargetOption

type MirrorTargetPhase

type MirrorTargetPhase = mirrv1.MirrorTargetPhase

type MirrorTargetStatus

type MirrorTargetStatus = mirrv1.MirrorTargetStatus

type MirrorTargetWatcher

type MirrorTargetWatcher k8s.ResourceController

func New

func New(opts ...Option) (MirrorTargetWatcher, error)

type Option

type Option func(r *reconciler) error

Option represents the functional option for reconciler.

func WithControllerName

func WithControllerName(name string) Option

WithControllerName returns the option to set the name of controller.

func WithLabels

func WithLabels(labels map[string]string) Option

WithLabels returns the option to set the label selector to get resources matching the given label.

func WithManager

func WithManager(mgr manager.Manager) Option

WithManager returns the option to set the controller manager.

func WithNamespace

func WithNamespace(ns string) Option

WithNamespace returns the option to set the namespace to get resources matching the given namespace..

func WithOnErrorFunc

func WithOnErrorFunc(f func(error)) Option

WithOnErrorFunc returns the option to set the function to notify an error.

func WithOnReconcileFunc

func WithOnReconcileFunc(f func(context.Context, map[string]Target)) Option

WithOnReconcileFunc returns the option to set the function to get the reconciled result.

type Target

type Target struct {
	Colocation string
	Host       string
	Port       int
	Phase      MirrorTargetPhase
}

Jump to

Keyboard shortcuts

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