Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRoute ¶
func NewRoute(dp RouteDataProvider) web.Route
NewRoute returns the page for this folder.
Types ¶
type DP ¶
type DP struct {
// contains filtered or unexported fields
}
DP provides the log entries that match the page's query.
type Entry ¶
type Entry struct {
Stamp string // the time as RFC 3339
Time string
App string
Source string
Level string
Class string // level-<Level> for DEBUG, INFO, WARN and ERROR; "" for any other level
Message string
Attrs string
Trace string // the trace id; "" when the entry has none, or one that is not a trace id
}
Entry is one log entry as the page shows it.
type Logs ¶
type Logs struct {
// Entries are the newest entries, newest first.
Entries []Entry
// Manual names the apps of the query that run by hand; their lines never reach aicoded dev.
Manual []string
// Problem is why the entries could not be listed.
Problem string
}
Logs is what the page shows of the entries that match its query.
type ReactiveState ¶
type ReactiveState struct {
// contains filtered or unexported fields
}
ReactiveState sends new values of the page's live variables to one open page. Its Set methods may be called from any goroutine.
func (*ReactiveState) SetLogs ¶
func (rs *ReactiveState) SetLogs(v Logs)
SetLogs stores v as logs and sends the parts of the page that show it.
type RouteDataProvider ¶
type RouteDataProvider interface {
Data(ctx context.Context, r *web.Request, w web.ResponseWriter, data *RouteData) error
// Subscribe runs while the page is open and must return when ctx is done.
Subscribe(ctx context.Context, r *web.Request, state *ReactiveState) error
}
RouteDataProvider is what this page's DP implements.
Click to show internal directories.
Click to hide internal directories.