nodesignature

package module
v0.0.0-...-36b9157 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

nodesignature computes the signature of a working set

A "working set" is a unordered set of namespaced work units running at any given time on a "node". The "signature" is a unique identifer which is bound to that specific working set. This allows to uniquely and concisely identify a workingset without enumerating all the names all the time. This concepts maps nicely on kubernetes (but is not limited to): "namespaced work units" = pods and "node" = (kubernetes) nodes.

LICENSE

apache v2

Documentation

Overview

Package nodesignature computes the signature of a working set. A "working set" is a unordered set of namespaced work units running at any given time on a "node". The "signature" is a unique identifer which is bound to that specific working set. This allows to uniquely and concisely identify a workingset without enumerating - and storing - all the names all the time. This concepts maps nicely on kubernetes (but is not limited to): "namespaced work units" = pods and "node" = (kubernetes) nodes.

Index

Constants

View Source
const (
	// Prefix is the string common to all the signatures
	// A prefix is always 4 bytes long
	Prefix = "nsgn"
	// Version is the version of this signature. You should
	// only compare compatible versions.
	// A Version is always 4 bytes long, in the form v\d\d\d
	Version = "v001"
)

Variables

View Source
var (
	ErrMalformed           = fmt.Errorf("malformed signature")
	ErrIncompatibleVersion = fmt.Errorf("incompatible version")
)

Functions

func IsVersionCompatible

func IsVersionCompatible(ver string) (bool, error)

Types

type NodeSignature

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

func NewNodeSignature

func NewNodeSignature() *NodeSignature

func (*NodeSignature) Add

func (ns *NodeSignature) Add(namespace, name string) error

func (*NodeSignature) Check

func (ns *NodeSignature) Check(sign string) error

func (*NodeSignature) Len

func (ns *NodeSignature) Len() int

func (*NodeSignature) Sign

func (ns *NodeSignature) Sign() string

func (*NodeSignature) Sum

func (ns *NodeSignature) Sum() []byte

Jump to

Keyboard shortcuts

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