Documentation ¶
Index ¶
- Variables
- func Flags()
- func NewServer(dbfile string) *allInOneSrvr
- func UseMockImpl()
- type Backender
- type Dbase
- func (db *Dbase) Close() error
- func (db *Dbase) Ids() []string
- func (db *Dbase) RetrieveIpmiMacs(id string) (m pb.MACs, err error)
- func (db *Dbase) RetrieveLog(id string) (m pb.LogEvents, err error)
- func (db *Dbase) RetrieveMacs(id string) (m pb.MACs, err error)
- func (db *Dbase) RetrievePass(id string) (p *pb.Credentials, err error)
- func (db *Dbase) StoreIpmiMacs(id string, m pb.MACs) error
- func (db *Dbase) StoreLog(id string, les *pb.LogEvents) error
- func (db *Dbase) StoreMacs(id string, m pb.MACs) error
- func (db *Dbase) StorePass(id string, p *pb.Credentials) error
- type HeldDocs
- type MockSrvr
- func (ms *MockSrvr) CheckFinished(sn, stage string) bool
- func (aio *MockSrvr) Close()
- func (ms *MockSrvr) Entries(id string) string
- func (a *MockSrvr) GetCredentials(ctx context.Context, ident *pb.Identifier) (*pb.Credentials, error)
- func (a *MockSrvr) GetTime(ctx context.Context, _ *empty.Empty) (*pb.Timestamp, error)
- func (ms *MockSrvr) Ids() []string
- func (a *MockSrvr) Log(ctx context.Context, evt *pb.LogEvent) (*pb.GenericResponse, error)
- func (ms *MockSrvr) MockCreds(sn string) common.Credentials
- func (a *MockSrvr) MonitorHolds(done chan struct{}) *sync.WaitGroup
- func (ms *MockSrvr) Port() int
- func (a *MockSrvr) ReportCodename(ctx context.Context, name *pb.Codename) (*pb.GenericResponse, error)
- func (a *MockSrvr) ReportState(ctx context.Context, s *pb.ProcessStage) (*pb.GenericResponse, error)
- func (a *MockSrvr) Serve()
- func (a *MockSrvr) ServeAt(port string)
- func (a *MockSrvr) ServeGrpcWith(lis net.Listener, gsrv *grpc.Server) error
- func (a *MockSrvr) ServeHttpWith(lis net.Listener, srvr *http.Server) error
- func (a *MockSrvr) StoreDocument(ctx context.Context, doc *pb.Document) (*pb.GenericResponse, error)
- func (a *MockSrvr) StoreIPMIMACs(ctx context.Context, m *pb.MACs) (*pb.GenericResponse, error)
- func (a *MockSrvr) StoreMACs(ctx context.Context, m *pb.MACs) (*pb.GenericResponse, error)
- type Persister
- type PrintableDoc
Constants ¶
This section is empty.
Variables ¶
var ( Port = ":8080" QAHold time.Duration PrintDir string )
var BuildId string
var HoldForPrinting chan PrintableDoc
var ReleaseForPrinting chan string
Functions ¶
Types ¶
type Dbase ¶
A trivial database impl for our data storage needs. Not recommended for any serious use. Sensitive information stored as PLAINTEXT. No auth. Etc etc etc.
All entries stored as protobuf; all items in one db. Log entries stored read-append-write, likely to perform very poorly at scale.
func (*Dbase) RetrieveIpmiMacs ¶
func (*Dbase) RetrievePass ¶
func (db *Dbase) RetrievePass(id string) (p *pb.Credentials, err error)
WARNING storage of credentials as plain text is a bad idea.
type MockSrvr ¶
type MockSrvr struct {
// contains filtered or unexported fields
}
func (*MockSrvr) CheckFinished ¶
func (*MockSrvr) GetCredentials ¶
func (a *MockSrvr) GetCredentials(ctx context.Context, ident *pb.Identifier) (*pb.Credentials, error)
func (*MockSrvr) MonitorHolds ¶
MonitorHolds starts background goroutines to process documents on hold. Set QAHold before calling.
func (*MockSrvr) ReportCodename ¶
func (a *MockSrvr) ReportCodename(ctx context.Context, name *pb.Codename) (*pb.GenericResponse, error)
pb.RecordKeeperServer
func (*MockSrvr) ReportState ¶
func (a *MockSrvr) ReportState(ctx context.Context, s *pb.ProcessStage) (*pb.GenericResponse, error)
func (*MockSrvr) ServeGrpcWith ¶
Grpc entry point. lis and gsrv may be nil, in which case defaults are used.
func (*MockSrvr) ServeHttpWith ¶
Http entry point. When used in integ tests, pass non-nil lis and/or srvr to specify port to be used and to allow graceful shutdown, respectively.
func (*MockSrvr) StoreDocument ¶
func (*MockSrvr) StoreIPMIMACs ¶
type Persister ¶
type Persister interface { //StoreLog actually appends. All other store operations overwrite. StoreLog(id string, les *pb.LogEvents) error RetrieveLog(id string) (m pb.LogEvents, err error) StoreMacs(id string, m pb.MACs) error RetrieveMacs(id string) (m pb.MACs, err error) StoreIpmiMacs(id string, m pb.MACs) error RetrieveIpmiMacs(id string) (m pb.MACs, err error) StorePass(id string, p *pb.Credentials) error RetrievePass(id string) (p *pb.Credentials, err error) Ids() []string Close() error }