Documentation ¶
Overview ¶
Package varlog contains http handler implementation for the varlog functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(logCtx zerolog.Context, opener FileOpener) http.Handler
NewHandler creates a new http.Handler which conforms to the varlog API Spec.
Types ¶
type FileOpener ¶
FileOpener defines the interface which is used to open file resources based on a single file name.
type LogParserHandler ¶
type LogParserHandler struct {
// contains filtered or unexported fields
}
LogParserHandler implements the v1 ServerInterface to open files and read lines from the end of it.
func NewLogParserHandler ¶
func NewLogParserHandler(logCtx zerolog.Context, opener FileOpener) *LogParserHandler
NewLogParserHandler returns a new instance of the LogParserHandler.
func (*LogParserHandler) GetEntries ¶
func (l *LogParserHandler) GetEntries(w http.ResponseWriter, r *http.Request, filename string, params v1.GetEntriesParams)
GetEntries uses the provided FileOpener implementation to retrieve the most recent log entries as part of the query parameters.
Click to show internal directories.
Click to hide internal directories.