mirror of
https://github.com/hanzoai/volume.git
synced 2026-11-03 04:24:40 +00:00
A fork of Rancher's local-path-provisioner at v0.0.36. The behaviour is unchanged and deliberately so — a directory on the node a pod lands on is the right thing for a disk. What changes is identity. The provisioner answers to hanzo.ai/volume rather than rancher.io/local-path. That is not branding: two provisioners sharing one name race for the same claims, and a stock k3s carries the upstream one, so a cluster running both would settle our storage by chance. Data lives at /var/lib/hanzo/volume, so reading a Hanzo cluster does not mean learning another vendor's directory. Apache-2.0 as published, unaltered, with Rancher's attribution in NOTICE. The README says what this is not: durability. A volume here dies with its node. That is hanzoai/replicate's question, one layer up, and keeping the two apart is what lets the disk stay this simple.
2.1 KiB
2.1 KiB
goyaml.v2
This package provides type and function aliases for the go.yaml.in/yaml/v2 package (which is compatible with gopkg.in/yaml.v2).
Purpose
The purpose of this package is to:
- Provide a transition path for users migrating from the sigs.k8s.io/yaml package to direct usage of go.yaml.in/yaml/v2
- Maintain compatibility with existing code while encouraging migration to the upstream package
- Reduce maintenance overhead by delegating to the upstream implementation
Usage
Instead of importing this package directly, you should migrate to using go.yaml.in/yaml/v2 directly:
// Old way
import "sigs.k8s.io/yaml/goyaml.v2"
// Recommended way
import "go.yaml.in/yaml/v2"
Available Types and Functions
All public types and functions from go.yaml.in/yaml/v2 are available through this package:
Types
MapSlice- Encodes and decodes as a YAML map with preserved key orderMapItem- An item in a MapSliceUnmarshaler- Interface for custom unmarshaling behaviorMarshaler- Interface for custom marshaling behaviorIsZeroer- Interface to check if an object is zeroDecoder- Reads and decodes YAML values from an input streamEncoder- Writes YAML values to an output streamTypeError- Error returned by Unmarshal for decoding issues
Functions
Unmarshal- Decodes YAML data into a Go valueUnmarshalStrict- Like Unmarshal but errors on unknown fieldsMarshal- Serializes a Go value into YAMLNewDecoder- Creates a new DecoderNewEncoder- Creates a new EncoderFutureLineWrap- Controls line wrapping behavior
Migration Guide
To migrate from this package to go.yaml.in/yaml/v2:
-
Update your import statements:
// From import "sigs.k8s.io/yaml/goyaml.v2" // To import "go.yaml.in/yaml/v2" -
No code changes should be necessary as the API is identical
-
Update your go.mod file to include the dependency:
require go.yaml.in/yaml/v2 v2.4.2
Deprecation Notice
All types and functions in this package are marked as deprecated. You should migrate to using go.yaml.in/yaml/v2 directly.