bundle

package
v0.0.0-...-2b28a7a Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle interface {
	// UpdateObject function to update a single object inside a bundle.
	UpdateObject(object Object)
	// DeleteObject function to delete a single object inside a bundle.
	DeleteObject(object Object)
	// GetBundleGeneration function to get bundle generation.
	GetBundleGeneration() uint64
}

Bundle is an abstraction for managing different bundle types.

func NewEdgeDeviceStatusBundle

func NewEdgeDeviceStatusBundle(leafHubName string, generation uint64) Bundle

NewEdgeDeviceStatusBundle creates a new instance of EdgeDeviceStatusBundle.

type EdgeDeviceStatusBundle

type EdgeDeviceStatusBundle struct {
	Objects     []Object `json:"objects"`
	LeafHubName string   `json:"leafHubName"`
	Generation  uint64   `json:"generation"`
	// contains filtered or unexported fields
}

EdgeDeviceStatusBundle is a bundle that is used to send to the hub of hubs the leaf CR as is except for fields that are not relevant in the hub of hubs like finalizers, etc. since we want to make edge device pretend to be a managed cluster, we can't use the generic form of status bundle (generic form can be found in leaf-hub-status-sync repo) and therefore it's required to implement the adapter.

func (*EdgeDeviceStatusBundle) DeleteObject

func (bundle *EdgeDeviceStatusBundle) DeleteObject(object Object)

DeleteObject function to delete a single object inside a bundle.

func (*EdgeDeviceStatusBundle) GetBundleGeneration

func (bundle *EdgeDeviceStatusBundle) GetBundleGeneration() uint64

GetBundleGeneration function to get bundle generation.

func (*EdgeDeviceStatusBundle) UpdateObject

func (bundle *EdgeDeviceStatusBundle) UpdateObject(object Object)

UpdateObject function to update a single object inside a bundle.

type Object

type Object interface {
	metav1.Object
	runtime.Object
}

Object is an interface for a single object inside a bundle.

Jump to

Keyboard shortcuts

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