controllers

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PausedAnnotation is the annotation that pauses the reconciliation
	PausedAnnotation string = "netpool.network.kanod.io/paused"
)

Variables

This section is empty.

Functions

func GetClient

func GetClient(
	kubeconfig *rest.Config,
) (*rest.RESTClient, error)

Types

type ErrorCode

type ErrorCode int
const (
	NO_ERROR ErrorCode = iota
	OTHER_ERROR
	CHECK_CERTIFICATE_ERROR
)

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

type ErrorResponseNetdef

type ErrorResponseNetdef struct {
	Code    ErrorCode `json:"code"`
	Message string    `json:"message"`
}

type GetChallengeRequest

type GetChallengeRequest struct {
	Poolname string `json:"poolname"`
}

type GetChallengeResponse

type GetChallengeResponse struct {
	Challenge string `json:"challenge"`
}

type GetPoolListResponse

type GetPoolListResponse struct {
	Poollist []string `json:"poollist"`
}

type NetworkData

type NetworkData struct {
	NetDefPool map[string]PoolSignature
}
var (
	NETWORKDATA NetworkData = NetworkData{
		NetDefPool: make(map[string]PoolSignature),
	}

	Mutex sync.Mutex
)

type NetworkReconciler

type NetworkReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

NetworkReconciler reconciles a Network object

func (*NetworkReconciler) Reconcile

func (r *NetworkReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*NetworkReconciler) SetupWithManager

func (r *NetworkReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type PoolRequest

type PoolRequest struct {
	Poolname  string `json:"poolname"`
	Signature string `json:"signature"`
}

type PoolSignature

type PoolSignature struct {
	PoolSign map[string]string
}

type SignChallengeRequest

type SignChallengeRequest struct {
	Challenge string `json:"challenge"`
}

type SignChallengeResponse

type SignChallengeResponse struct {
	Challenge       string `json:"challenge"`
	SignedChallenge string `json:"signedchallenge"`
}

Jump to

Keyboard shortcuts

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