Documentation ¶
Index ¶
- Variables
- func ConfigSaveRaw(data []byte) error
- type ByMachineName
- type ByName
- type Machine
- func (r *Machine) Age(newP *Machine) time.Duration
- func (m *Machine) ConfigLoad() error
- func (m *Machine) ConfigSave() error
- func (*Machine) Descriptor() ([]byte, []int)deprecated
- func (m *Machine) FindInstalledByName(name string) *Package
- func (m *Machine) FindPackageByName(name string) *Package
- func (m *Machine) FindVersion(name string, version string) *Package
- func (x *Machine) GetAvailable() *Packages
- func (x *Machine) GetCpus() int64
- func (x *Machine) GetDistro() string
- func (x *Machine) GetHostname() string
- func (x *Machine) GetInstalled() *Packages
- func (x *Machine) GetLaststamp() *timestamppb.Timestamp
- func (x *Machine) GetMemory() int64
- func (x *Machine) GetPackages() *Packages
- func (x *Machine) GetWit() *Packages
- func (m *Machine) InitWit() error
- func (m *Machine) IsInstalled(name string) bool
- func (m *Machine) Marshal() ([]byte, error)
- func (m *Machine) MarshalJSON() ([]byte, error)
- func (m *Machine) MarshalTEXT() ([]byte, error)
- func (*Machine) ProtoMessage()
- func (x *Machine) ProtoReflect() protoreflect.Message
- func (x *Machine) Reset()
- func (x *Machine) String() string
- func (m *Machine) Unmarshal(data []byte) error
- func (me *Machine) UpdatePackages() string
- type MachineIterator
- type Machines
- func (r *Machines) All() *MachineIterator
- func (r *Machines) Append(newP *Machine) bool
- func (m *Machines) ConfigLoad() error
- func (m *Machines) ConfigSave() error
- func (*Machines) Descriptor() ([]byte, []int)deprecated
- func (r *Machines) FindByName(name string) *Machine
- func (x *Machines) GetMachines() []*Machine
- func (x *Machines) GetUuid() string
- func (x *Machines) GetVersion() string
- func (r *Machines) Len() int
- func (m *Machines) Marshal() ([]byte, error)
- func (*Machines) ProtoMessage()
- func (x *Machines) ProtoReflect() protoreflect.Message
- func (x *Machines) Reset()
- func (r *Machines) SortByName() *MachineIterator
- func (x *Machines) String() string
- func (m *Machines) Unmarshal(data []byte) error
- type Package
- func (r *Package) Age(newP *Package) time.Duration
- func (*Package) Descriptor() ([]byte, []int)deprecated
- func (x *Package) GetInstalled() bool
- func (x *Package) GetLaststamp() *timestamppb.Timestamp
- func (x *Package) GetName() string
- func (x *Package) GetPkgName() string
- func (x *Package) GetSrcPath() string
- func (x *Package) GetVersion() string
- func (*Package) ProtoMessage()
- func (x *Package) ProtoReflect() protoreflect.Message
- func (x *Package) Reset()
- func (x *Package) String() string
- type PackageIterator
- type Packages
- func (r *Packages) All() *PackageIterator
- func (r *Packages) Append(newP *Package) bool
- func (*Packages) Descriptor() ([]byte, []int)deprecated
- func (r *Packages) FindByName(name string) *Package
- func (p *Packages) FormatJSON() string
- func (p *Packages) FormatTEXT() string
- func (x *Packages) GetPackages() []*Package
- func (x *Packages) GetUuid() string
- func (x *Packages) GetVersion() string
- func (r *Packages) Len() int
- func (p *Packages) Marshal() ([]byte, error)
- func (p *Packages) MarshalJSON() ([]byte, error)
- func (*Packages) ProtoMessage()
- func (x *Packages) ProtoReflect() protoreflect.Message
- func (x *Packages) Reset()
- func (r *Packages) SortByName() *PackageIterator
- func (x *Packages) String() string
- func (p *Packages) Unmarshal(data []byte) error
- func (p *Packages) UnmarshalJSON(data []byte) error
- func (r *Packages) Update(newP *Package) bool
Constants ¶
This section is empty.
Variables ¶
var BUILDTIME string
var File_machine_proto protoreflect.FileDescriptor
var File_package_proto protoreflect.FileDescriptor
var VERSION string
sent via -ldflags
Functions ¶
func ConfigSaveRaw ¶ added in v0.0.6
Types ¶
type ByMachineName ¶ added in v0.0.3
type ByMachineName []*Machine
func (ByMachineName) Len ¶ added in v0.0.3
func (a ByMachineName) Len() int
func (ByMachineName) Less ¶ added in v0.0.3
func (a ByMachineName) Less(i, j int) bool
func (ByMachineName) Swap ¶ added in v0.0.3
func (a ByMachineName) Swap(i, j int)
type Machine ¶ added in v0.0.4
type Machine struct { Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` Memory int64 `protobuf:"varint,2,opt,name=memory,proto3" json:"memory,omitempty"` Cpus int64 `protobuf:"varint,3,opt,name=cpus,proto3" json:"cpus,omitempty"` Distro string `protobuf:"bytes,4,opt,name=distro,proto3" json:"distro,omitempty"` Packages *Packages `protobuf:"bytes,5,opt,name=packages,proto3" json:"packages,omitempty"` Laststamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=laststamp,proto3" json:"laststamp,omitempty"` // the last time we heard anything from this machine Installed *Packages `protobuf:"bytes,7,opt,name=installed,proto3" json:"installed,omitempty"` // packages that are installed Available *Packages `protobuf:"bytes,8,opt,name=available,proto3" json:"available,omitempty"` // packages that are available Wit *Packages `protobuf:"bytes,9,opt,name=wit,proto3" json:"wit,omitempty"` // packages that are available from mirrors.wit.com // contains filtered or unexported fields }
func (*Machine) ConfigLoad ¶ added in v0.0.7
func (*Machine) ConfigSave ¶ added in v0.0.7
when running on a single machine, save the file in forge/ as <hostname>.pb write to ~/.config/forge/ unless ENV{FORGE_HOME} is set
func (*Machine) Descriptor
deprecated
added in
v0.0.4
func (*Machine) FindInstalledByName ¶ added in v0.0.8
func (*Machine) FindPackageByName ¶ added in v0.0.5
find a package by name
func (*Machine) FindVersion ¶ added in v0.0.8
looks to see if any package matches a name and version if version == "", return the first name found
func (*Machine) GetAvailable ¶ added in v0.0.7
func (*Machine) GetHostname ¶ added in v0.0.4
func (*Machine) GetInstalled ¶ added in v0.0.7
func (*Machine) GetLaststamp ¶ added in v0.0.4
func (x *Machine) GetLaststamp() *timestamppb.Timestamp
func (*Machine) GetPackages ¶ added in v0.0.4
func (*Machine) IsInstalled ¶ added in v0.0.8
func (*Machine) MarshalJSON ¶ added in v0.0.7
marshal to JSON
func (*Machine) MarshalTEXT ¶ added in v0.0.7
marshal to TEXT
func (*Machine) ProtoMessage ¶ added in v0.0.4
func (*Machine) ProtoMessage()
func (*Machine) ProtoReflect ¶ added in v0.0.4
func (x *Machine) ProtoReflect() protoreflect.Message
func (*Machine) UpdatePackages ¶ added in v0.0.7
type MachineIterator ¶ added in v0.0.3
func NewMachineIterator ¶ added in v0.0.3
func NewMachineIterator(packs []*Machine) *MachineIterator
NewMachineIterator initializes a new iterator.
func (*MachineIterator) Machine ¶ added in v0.0.3
func (it *MachineIterator) Machine() *Machine
Machine returns the current repo.
func (*MachineIterator) Scan ¶ added in v0.0.3
func (it *MachineIterator) Scan() bool
Scan moves to the next element and returns false if there are no more packs.
type Machines ¶ added in v0.0.4
type Machines struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // I guess why not just have this on each file Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // maybe can be used for protobuf schema change violations Machines []*Machine `protobuf:"bytes,3,rep,name=machines,proto3" json:"machines,omitempty"` // contains filtered or unexported fields }
func (*Machines) All ¶ added in v0.0.4
func (r *Machines) All() *MachineIterator
func (*Machines) ConfigLoad ¶ added in v0.0.6
func (*Machines) ConfigSave ¶ added in v0.0.6
writes out the cluster information it seperate files to make it humanly possible to hand edit things as needed
func (*Machines) Descriptor
deprecated
added in
v0.0.4
func (*Machines) FindByName ¶ added in v0.0.4
find a machine by name
func (*Machines) GetMachines ¶ added in v0.0.4
func (*Machines) GetVersion ¶ added in v0.0.4
func (*Machines) ProtoMessage ¶ added in v0.0.4
func (*Machines) ProtoMessage()
func (*Machines) ProtoReflect ¶ added in v0.0.4
func (x *Machines) ProtoReflect() protoreflect.Message
func (*Machines) SortByName ¶ added in v0.0.4
func (r *Machines) SortByName() *MachineIterator
type Package ¶ added in v0.0.4
type Package struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // name: zookeeper-go Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // version: 0.0.3 Laststamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=laststamp,proto3" json:"laststamp,omitempty"` // the last time this package was seen (used to timeout entries) SrcPath string `protobuf:"bytes,4,opt,name=srcPath,proto3" json:"srcPath,omitempty"` // path to the sources (go.wit.com/apps/zookeeper) Installed bool `protobuf:"varint,5,opt,name=installed,proto3" json:"installed,omitempty"` // if installed on your machine, this should be set to true PkgName string `protobuf:"bytes,6,opt,name=pkgName,proto3" json:"pkgName,omitempty"` // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb // contains filtered or unexported fields }
func (*Package) Descriptor
deprecated
added in
v0.0.4
func (*Package) GetInstalled ¶ added in v0.0.7
func (*Package) GetLaststamp ¶ added in v0.0.4
func (x *Package) GetLaststamp() *timestamppb.Timestamp
func (*Package) GetPkgName ¶ added in v0.0.8
func (*Package) GetSrcPath ¶ added in v0.0.7
func (*Package) GetVersion ¶ added in v0.0.4
func (*Package) ProtoMessage ¶ added in v0.0.4
func (*Package) ProtoMessage()
func (*Package) ProtoReflect ¶ added in v0.0.4
func (x *Package) ProtoReflect() protoreflect.Message
type PackageIterator ¶ added in v0.0.3
func NewPackageIterator ¶ added in v0.0.3
func NewPackageIterator(packs []*Package) *PackageIterator
NewPackageIterator initializes a new iterator.
func (*PackageIterator) Package ¶ added in v0.0.3
func (it *PackageIterator) Package() *Package
Package returns the current repo.
func (*PackageIterator) Scan ¶ added in v0.0.3
func (it *PackageIterator) Scan() bool
Scan moves to the next element and returns false if there are no more packs.
type Packages ¶ added in v0.0.4
type Packages struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // I guess why not just have this on each file Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // maybe can be used for protobuf schema change violations Packages []*Package `protobuf:"bytes,3,rep,name=packages,proto3" json:"packages,omitempty"` // contains filtered or unexported fields }
func (*Packages) All ¶ added in v0.0.4
func (r *Packages) All() *PackageIterator
func (*Packages) Descriptor
deprecated
added in
v0.0.4
func (*Packages) FindByName ¶ added in v0.0.4
find a package by name
func (*Packages) FormatJSON ¶ added in v0.0.4
human readable JSON
func (*Packages) FormatTEXT ¶ added in v0.0.4
apparently this isn't supposed to be used? https://protobuf.dev/reference/go/faq/#unstable-text this is a shame because this is much nicer output than JSON Format()
func (*Packages) GetPackages ¶ added in v0.0.4
func (*Packages) GetVersion ¶ added in v0.0.4
func (*Packages) MarshalJSON ¶ added in v0.0.4
marshal json
func (*Packages) ProtoMessage ¶ added in v0.0.4
func (*Packages) ProtoMessage()
func (*Packages) ProtoReflect ¶ added in v0.0.4
func (x *Packages) ProtoReflect() protoreflect.Message
func (*Packages) SortByName ¶ added in v0.0.4
func (r *Packages) SortByName() *PackageIterator
func (*Packages) UnmarshalJSON ¶ added in v0.0.4
unmarshal