Documentation ¶
Overview ¶
Package storagepb provides storage protobuf client and server interfaces.
Index ¶
- Variables
- type ByReqs
- type Group
- func (g *Group) AssertValid() error
- func (g *Group) Copy() *Group
- func (*Group) Descriptor() ([]byte, []int)
- func (m *Group) GetId() string
- func (m *Group) GetMetadata() []byte
- func (m *Group) GetName() string
- func (m *Group) GetProfile() string
- 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)
- func (m *Group) XXX_DiscardUnknown()
- func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Group) XXX_Merge(src proto.Message)
- func (m *Group) XXX_Size() int
- func (m *Group) XXX_Unmarshal(b []byte) error
- type NetBoot
- func (b *NetBoot) Copy() *NetBoot
- func (*NetBoot) Descriptor() ([]byte, []int)
- func (m *NetBoot) GetArgs() []string
- func (m *NetBoot) GetInitrd() []string
- func (m *NetBoot) GetKernel() string
- func (*NetBoot) ProtoMessage()
- func (m *NetBoot) Reset()
- func (m *NetBoot) String() string
- func (m *NetBoot) XXX_DiscardUnknown()
- func (m *NetBoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NetBoot) XXX_Merge(src proto.Message)
- func (m *NetBoot) XXX_Size() int
- func (m *NetBoot) XXX_Unmarshal(b []byte) error
- type Profile
- func (p *Profile) AssertValid() error
- func (p *Profile) Copy() *Profile
- func (*Profile) Descriptor() ([]byte, []int)
- func (m *Profile) GetBoot() *NetBoot
- func (m *Profile) GetCloudId() string
- func (m *Profile) GetGenericId() string
- func (m *Profile) GetId() string
- func (m *Profile) GetIgnitionId() string
- func (m *Profile) GetName() string
- func (*Profile) ProtoMessage()
- func (m *Profile) Reset()
- func (m *Profile) String() string
- func (m *Profile) XXX_DiscardUnknown()
- func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Profile) XXX_Merge(src proto.Message)
- func (m *Profile) XXX_Size() int
- func (m *Profile) XXX_Unmarshal(b []byte) error
- 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,proto3" json:"id,omitempty"` // human readable name Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Profile id Profile string `protobuf:"bytes,3,opt,name=profile,proto3" json:"profile,omitempty"` // Selectors to match machines Selector map[string]string `` /* 157-byte string literal not displayed */ // JSON encoded metadata Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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) GetMetadata ¶
func (*Group) GetProfile ¶
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.
func (*Group) XXX_DiscardUnknown ¶ added in v0.9.0
func (m *Group) XXX_DiscardUnknown()
func (*Group) XXX_Marshal ¶ added in v0.9.0
func (*Group) XXX_Unmarshal ¶ added in v0.9.0
type NetBoot ¶
type NetBoot struct { // the URL of the kernel image Kernel string `protobuf:"bytes,1,opt,name=kernel,proto3" json:"kernel,omitempty"` // the init RAM filesystem URLs Initrd []string `protobuf:"bytes,2,rep,name=initrd,proto3" json:"initrd,omitempty"` // kernel args Args []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
NetBoot describes network or PXE boot settings for a machine.
func (*NetBoot) Descriptor ¶
func (*NetBoot) ProtoMessage ¶
func (*NetBoot) ProtoMessage()
func (*NetBoot) XXX_DiscardUnknown ¶ added in v0.9.0
func (m *NetBoot) XXX_DiscardUnknown()
func (*NetBoot) XXX_Marshal ¶ added in v0.9.0
func (*NetBoot) XXX_Unmarshal ¶ added in v0.9.0
type Profile ¶
type Profile struct { // profile id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // human readable name Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // ignition id IgnitionId string `protobuf:"bytes,3,opt,name=ignition_id,json=ignitionId,proto3" json:"ignition_id,omitempty"` // cloud config id CloudId string `protobuf:"bytes,4,opt,name=cloud_id,json=cloudId,proto3" json:"cloud_id,omitempty"` // support network boot / PXE Boot *NetBoot `protobuf:"bytes,5,opt,name=boot,proto3" json:"boot,omitempty"` // generic config id GenericId string `protobuf:"bytes,6,opt,name=generic_id,json=genericId,proto3" json:"generic_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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) GetCloudId ¶
func (*Profile) GetGenericId ¶
func (*Profile) GetIgnitionId ¶
func (*Profile) ProtoMessage ¶
func (*Profile) ProtoMessage()
func (*Profile) XXX_DiscardUnknown ¶ added in v0.9.0
func (m *Profile) XXX_DiscardUnknown()
func (*Profile) XXX_Marshal ¶ added in v0.9.0
func (*Profile) XXX_Unmarshal ¶ added in v0.9.0
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.