Documentation
¶
Overview ¶
Package storagepb provides storage protobuf client and server interfaces.
Package storagepb is a generated protocol buffer package.
It is generated from these files:
storage.proto
It has these top-level messages:
Group Profile NetBoot
Index ¶
- Variables
- type ByReqs
- type Group
- func (g *Group) AssertValid() error
- func (g *Group) Copy() *Group
- func (*Group) Descriptor() ([]byte, []int)
- func (m *Group) GetSelector() map[string]string
- func (g *Group) Matches(labels map[string]string) bool
- func (g *Group) Normalize() error
- func (*Group) ProtoMessage()
- func (m *Group) Reset()
- func (m *Group) String() string
- func (g *Group) ToRichGroup() (*RichGroup, error)
- type NetBoot
- type Profile
- type RichGroup
Constants ¶
This section is empty.
Variables ¶
var (
ErrIdRequired = errors.New("Id is required")
)
var (
ErrProfileRequired = errors.New("Group requires a Profile")
)
Functions ¶
This section is empty.
Types ¶
type ByReqs ¶
type ByReqs []*Group
ByReqs defines a collection of Group structs which have a deterministic sorted order by increasing number of Requirements, then by sorted key/value strings. For example, a Group with Requirements {a:b, c:d} should be ordered after one with {a:b} and before one with {a:d, c:d}.
type Group ¶
type Group struct { // machine readable Id Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` // human readable name Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` // Profile id Profile string `protobuf:"bytes,3,opt,name=profile" json:"profile,omitempty"` // Selectors to match machines Selector map[string]string `` /* 136-byte string literal not displayed */ // JSON encoded metadata Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` }
Group selects one or more machines and matches them to a Profile.
func ParseGroup ¶
ParseGroup parses bytes into a Group.
func (*Group) AssertValid ¶
AssertValid validates a Group. Returns nil if there are no validation errors.
func (*Group) Descriptor ¶
func (*Group) GetSelector ¶
func (*Group) Matches ¶
Matches returns true if the given labels satisfy all the selector requirements, false otherwise.
func (*Group) Normalize ¶
Normalize normalizes Group selectors according to reserved selector rules which require "mac" addresses to be valid, normalized MAC addresses.
func (*Group) ProtoMessage ¶
func (*Group) ProtoMessage()
func (*Group) ToRichGroup ¶
ToRichGroup converts a Group into a RichGroup suitable for writing and user manipulation.
type NetBoot ¶
type NetBoot struct { // the URL of the kernel image Kernel string `protobuf:"bytes,1,opt,name=kernel" json:"kernel,omitempty"` // the init RAM filesystem URLs Initrd []string `protobuf:"bytes,2,rep,name=initrd" json:"initrd,omitempty"` // kernel parameters (command line) Cmdline map[string]string `` /* 134-byte string literal not displayed */ }
NetBoot describes network or PXE boot settings for a machine.
func (*NetBoot) Descriptor ¶
func (*NetBoot) GetCmdline ¶
func (*NetBoot) ProtoMessage ¶
func (*NetBoot) ProtoMessage()
type Profile ¶
type Profile struct { // profile id Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` // human readable name Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` // ignition id IgnitionId string `protobuf:"bytes,3,opt,name=ignition_id,json=ignitionId" json:"ignition_id,omitempty"` // cloud config id CloudId string `protobuf:"bytes,4,opt,name=cloud_id,json=cloudId" json:"cloud_id,omitempty"` // support network boot / PXE Boot *NetBoot `protobuf:"bytes,5,opt,name=boot" json:"boot,omitempty"` // generic config id GenericId string `protobuf:"bytes,6,opt,name=generic_id,json=genericId" json:"generic_id,omitempty"` }
Profile defines the boot and provisioning behavior of a group of machines.
func ParseProfile ¶
ParseProfile parses bytes into a Profile.
func (*Profile) AssertValid ¶
AssertValid validates a Profile. Returns nil if there are no validation errors.
func (*Profile) Descriptor ¶
func (*Profile) ProtoMessage ¶
func (*Profile) ProtoMessage()
type RichGroup ¶
type RichGroup struct { // machine readable Id Id string `json:"id,omitempty"` // Human readable name Name string `json:"name,omitempty"` // Profile id Profile string `json:"profile,omitempty"` // Selectors to match machines Selector map[string]string `json:"selector,omitempty"` // Metadata Metadata map[string]interface{} `json:"metadata,omitempty"` }
RichGroup is a user provided Group definition.