Documentation ¶
Index ¶
- Constants
- type App
- func (app *App) GetNoteByID(id string) (note.Note, error)
- func (app *App) GetSolutionByName(name string) (solution.Solution, error)
- func (app *App) GetSortedSolutionEnabledNotes() (allNoteIDs []string)
- func (app *App) RevertAll(permanent bool) error
- func (app *App) RevertNote(noteID string, permanent bool) error
- func (app *App) RevertSolution(solName string) error
- func (app *App) SaveConfig() error
- func (app *App) TuneAll() error
- func (app *App) TuneNote(noteID string) error
- func (app *App) TuneSolution(solName string) (removedExplicitNotes []string, err error)
- func (app *App) VerifyAll() (unsatisfiedNotes []string, ...)
- func (app *App) VerifyNote(noteID string) (conforming bool, comparisons map[string]note.NoteFieldComparison, err error)
- func (app *App) VerifySolution(solName string) (unsatisfiedNotes []string, ...)
- type State
- func (state *State) GetPathToNote(noteID string) string
- func (state *State) List() (ret []string, err error)
- func (state *State) Remove(noteID string) error
- func (state *State) Retrieve(noteID string, dest interface{}) error
- func (state *State) Store(noteID string, obj note.Note, overwriteExisting bool) error
Constants ¶
const ( SysconfigSaptuneDir = "/etc/sysconfig/saptune" TuneForSolutionsKey = "TUNE_FOR_SOLUTIONS" TuneForNotesKey = "TUNE_FOR_NOTES" )
const SaptuneStateDir = "/var/lib/saptune/saved_state"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { SysconfigPrefix string AllNotes map[string]note.Note // all notes AllSolutions map[string]solution.Solution // all solutions TuneForSolutions []string // list of solution names to tune, must always be sorted in ascending order. TuneForNotes []string // list of additional notes to tune, must always be sorted in ascending order. State *State // examine and manage serialised notes. }
Application configuration and serialised state information.
func InitialiseApp ¶
func InitialiseApp(sysconfigPrefix, stateDirPrefix string, allNotes map[string]note.Note, allSolutions map[string]solution.Solution) (app *App)
Load application configuration. Panic on error.
func (*App) GetNoteByID ¶
Return the note corresponding to the number, or an error if the note does not exist.
func (*App) GetSolutionByName ¶
Return the solution corresponding to the name, or an error if it does not exist.
func (*App) GetSortedSolutionEnabledNotes ¶
Return the number of all solution-enabled SAP notes, sorted.
func (*App) RevertAll ¶
Revert all tuned parameters (both solutions and additional notes), and clear stored states.
func (*App) RevertNote ¶
Revert parameters tuned by the note and clear its stored states.
func (*App) RevertSolution ¶
Permanently revert notes tuned by the solution and clear their stored states.
func (*App) TuneNote ¶
Apply tuning for a note. If the note is not yet covered by one of the enabled solutions, the note number will be added into the list of additional notes.
func (*App) TuneSolution ¶
Apply tuning for a solution. If the solution is not yet enabled, the name will be added into the list of tuned solution names. If the solution covers any of the additional notes, those notes will be removed.
func (*App) VerifyAll ¶
func (app *App) VerifyAll() (unsatisfiedNotes []string, comparisons map[string]map[string]note.NoteFieldComparison, err error)
Inspect the system and verify all parameters against all enabled notes/solutions. The note comparison results will always contain all fields from all notes.
func (*App) VerifyNote ¶
func (app *App) VerifyNote(noteID string) (conforming bool, comparisons map[string]note.NoteFieldComparison, err error)
Inspect the system and verify that all parameters conform to the note's guidelines. The note comparison results will always contain all fields, no matter the note is currently conforming or not.
func (*App) VerifySolution ¶
func (app *App) VerifySolution(solName string) (unsatisfiedNotes []string, comparisons map[string]map[string]note.NoteFieldComparison, err error)
Inspect the system and verify that all parameters conform to all of the notes associated to the solution. The note comparison results will always contain all fields from all notes.
type State ¶
type State struct {
StateDirPrefix string
}
Store and manage serialised note states.
func (*State) GetPathToNote ¶
Return path to the serialised note state file.