Documentation
¶
Index ¶
- Constants
- func ListenAddr() string
- func SortTraceSummariesByDuration(items []*TraceSummary)
- type APICallRequest
- type AppRecord
- type AppStatus
- type DashboardBundle
- type DevEvent
- type DevEventParse
- type DevEventQuery
- type DevSource
- type LogEvent
- type LogLevelCount
- type Notification
- type ObservabilityBackendState
- type ObservabilityScope
- type ObservabilityState
- type ProcessEvent
- type ProcessOutput
- type QueryRequest
- type ReportEnvelope
- type Store
- func (s *Store) AdvanceDevEventID(ctx context.Context, nextID int64) error
- func (s *Store) Close() error
- func (s *Store) CreateStoredRequest(ctx context.Context, req StoredRequest) (StoredRequest, error)
- func (s *Store) DeleteDevEventsForSession(ctx context.Context, appID, sessionID string) (int64, int64, error)
- func (s *Store) DeleteStoredRequest(ctx context.Context, appID, id string) error
- func (s *Store) Flush(ctx context.Context) error
- func (s *Store) GetApp(ctx context.Context, appID string) (AppRecord, error)
- func (s *Store) GetAppForSession(ctx context.Context, appID, sessionID string) (AppRecord, error)
- func (s *Store) GetAppSession(ctx context.Context, routeID string) (AppRecord, error)
- func (s *Store) ListAppSessions(ctx context.Context) ([]AppRecord, error)
- func (s *Store) ListApps(ctx context.Context) ([]AppRecord, error)
- func (s *Store) ListDevEvents(ctx context.Context, query DevEventQuery) ([]DevEvent, error)
- func (s *Store) ListDevSources(ctx context.Context, appID, sessionID string) ([]DevSource, error)
- func (s *Store) ListProcessEvents(ctx context.Context, appID string, limit int) ([]ProcessEvent, error)
- func (s *Store) ListProcessOutput(ctx context.Context, appID string, limit int) ([]ProcessOutput, error)
- func (s *Store) ListProcessOutputForSession(ctx context.Context, appID, sessionID string, limit int) ([]ProcessOutput, error)
- func (s *Store) ListProcessOutputSince(ctx context.Context, appID string, afterID int64, limit int) ([]ProcessOutput, error)
- func (s *Store) ListProcessOutputSinceForSession(ctx context.Context, appID, sessionID string, afterID int64, limit int) ([]ProcessOutput, error)
- func (s *Store) ListStoredRequests(ctx context.Context, appID string) ([]StoredRequest, error)
- func (s *Store) NextDevEventID(ctx context.Context) (int64, error)
- func (s *Store) UpdateStoredRequest(ctx context.Context, req StoredRequest) (StoredRequest, error)
- func (s *Store) UpsertApp(ctx context.Context, app AppRecord) error
- func (s *Store) UpsertDevSource(ctx context.Context, appID, sessionID string, source DevSource) error
- func (s *Store) WriteDevEvent(ctx context.Context, event DevEvent) error
- func (s *Store) WriteDevEventReturningID(ctx context.Context, event DevEvent) (int64, error)
- func (s *Store) WriteProcessEvent(ctx context.Context, appID, kind string, payload any) error
- func (s *Store) WriteProcessOutput(ctx context.Context, output ProcessOutput) error
- type StoredApp
- type StoredAppModelRef
- type StoredAppSession
- type StoredRequest
- type StoredRequestData
- type TraceEvent
- type TraceQuery
- type TraceSummary
Constants ¶
View Source
const ( DevEventKind = "scenery.dev.event" DevEventSchemaRevision = "sha256:88d7bd9bd7e38e93de754e8508bde933e9d49d48a5391c29686e11737bb5ba2e" )
View Source
const ( DashboardAddr = "127.0.0.1:9401" WebSocketPath = "/__scenery" ReportPath = "/__scenery/report" )
Variables ¶
This section is empty.
Functions ¶
func ListenAddr ¶
func ListenAddr() string
func SortTraceSummariesByDuration ¶
func SortTraceSummariesByDuration(items []*TraceSummary)
Types ¶
type APICallRequest ¶
type APICallRequest struct {
AppID string `json:"app_id"`
Service string `json:"service"`
Endpoint string `json:"endpoint"`
Path string `json:"path"`
Method string `json:"method"`
Payload json.RawMessage `json:"payload"`
AuthPayload json.RawMessage `json:"auth_payload,omitempty"`
AuthToken string `json:"auth_token,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
}
type AppRecord ¶
type AppRecord struct {
RouteID string
ID string
BaseAppID string
RuntimeAppID string
SessionID string
Name string
Root string
ListenAddr string
Metadata json.RawMessage
APIEncoding json.RawMessage
Routes map[string]string
Aliases map[string]string
Offline bool
Running bool
SessionStatus string
SessionStatusReason string
Compiling bool
CompileError string
PID string
UpdatedAt time.Time
}
type AppStatus ¶
type AppStatus struct {
Running bool `json:"running"`
AppID string `json:"appID"`
BaseAppID string `json:"baseAppID,omitempty"`
RuntimeAppID string `json:"runtimeAppID,omitempty"`
SessionID string `json:"sessionID,omitempty"`
AppRoot string `json:"appRoot"`
PID string `json:"pid,omitempty"`
Meta json.RawMessage `json:"meta,omitempty"`
Addr string `json:"addr,omitempty"`
APIEncoding json.RawMessage `json:"apiEncoding,omitempty"`
Observability *ObservabilityState `json:"observability,omitempty"`
Routes map[string]string `json:"routes,omitempty"`
Aliases map[string]string `json:"aliases,omitempty"`
SessionStatus string `json:"sessionStatus,omitempty"`
SessionStatusReason string `json:"sessionStatusReason,omitempty"`
DashboardBundle *DashboardBundle `json:"dashboardBundle,omitempty"`
Compiling bool `json:"compiling"`
CompileError string `json:"compileError,omitempty"`
}
type DashboardBundle ¶ added in v0.3.2
type DevEvent ¶
type DevEvent struct {
ID int64 `json:"id"`
AppID string `json:"-"`
AppRoot string `json:"-"`
SessionID string `json:"session_id,omitempty"`
Source DevSource `json:"source"`
Level string `json:"level"`
Message string `json:"message"`
Fields json.RawMessage `json:"fields,omitempty"`
Raw string `json:"raw,omitempty"`
Parse DevEventParse `json:"parse"`
CreatedAt time.Time `json:"-"`
}
func DevEventFromOutput ¶
type DevEventParse ¶
type DevEventQuery ¶
type DevSource ¶
type DevSource struct {
ID string `json:"id"`
Kind string `json:"kind,omitempty"`
Name string `json:"name,omitempty"`
Role string `json:"role,omitempty"`
PID string `json:"pid,omitempty"`
Stream string `json:"stream,omitempty"`
RestartID string `json:"restart_id,omitempty"`
Status string `json:"status,omitempty"`
URL string `json:"url,omitempty"`
Reason string `json:"reason,omitempty"`
}
type LogLevelCount ¶
type Notification ¶
type ObservabilityBackendState ¶ added in v0.3.2
type ObservabilityBackendState struct {
Enabled bool `json:"enabled"`
Available bool `json:"available"`
Status string `json:"status"`
URL string `json:"url,omitempty"`
QueryPath string `json:"query_path,omitempty"`
Dialect string `json:"dialect,omitempty"`
Message string `json:"message,omitempty"`
}
type ObservabilityScope ¶ added in v0.3.2
type ObservabilityState ¶ added in v0.3.2
type ObservabilityState struct {
Enabled bool `json:"enabled"`
Backend string `json:"backend"`
Metrics ObservabilityBackendState `json:"metrics"`
Logs ObservabilityBackendState `json:"logs"`
Traces ObservabilityBackendState `json:"traces"`
Scope *ObservabilityScope `json:"scope,omitempty"`
Message string `json:"message,omitempty"`
}
type ProcessEvent ¶
type ProcessOutput ¶
type QueryRequest ¶
type ReportEnvelope ¶
type ReportEnvelope = devreport.ReportEnvelope
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AdvanceDevEventID ¶
func (*Store) CreateStoredRequest ¶
func (s *Store) CreateStoredRequest(ctx context.Context, req StoredRequest) (StoredRequest, error)
func (*Store) DeleteDevEventsForSession ¶
func (*Store) DeleteStoredRequest ¶
func (*Store) GetAppForSession ¶
func (*Store) GetAppSession ¶
func (*Store) ListAppSessions ¶
func (*Store) ListDevEvents ¶
func (*Store) ListDevSources ¶
func (*Store) ListProcessEvents ¶
func (*Store) ListProcessOutput ¶
func (*Store) ListProcessOutputForSession ¶
func (*Store) ListProcessOutputSince ¶
func (*Store) ListProcessOutputSinceForSession ¶
func (*Store) ListStoredRequests ¶
func (*Store) UpdateStoredRequest ¶
func (s *Store) UpdateStoredRequest(ctx context.Context, req StoredRequest) (StoredRequest, error)
func (*Store) UpsertDevSource ¶
func (*Store) WriteDevEvent ¶
func (*Store) WriteDevEventReturningID ¶
func (*Store) WriteProcessEvent ¶
func (*Store) WriteProcessOutput ¶
func (s *Store) WriteProcessOutput(ctx context.Context, output ProcessOutput) error
type StoredApp ¶ added in v0.2.9
type StoredApp struct {
RouteID string `json:"route_id,omitempty"`
ID string `json:"id"`
BaseAppID string `json:"base_app_id,omitempty"`
RuntimeAppID string `json:"runtime_app_id,omitempty"`
SessionID string `json:"session_id,omitempty"`
Name string `json:"name,omitempty"`
Root string `json:"root,omitempty"`
ListenAddr string `json:"listen_addr,omitempty"`
Routes map[string]string `json:"routes,omitempty"`
Aliases map[string]string `json:"aliases,omitempty"`
Offline bool `json:"offline,omitempty"`
Running bool `json:"running,omitempty"`
SessionStatus string `json:"session_status,omitempty"`
SessionStatusReason string `json:"session_status_reason,omitempty"`
Compiling bool `json:"compiling,omitempty"`
CompileError string `json:"compile_error,omitempty"`
PID string `json:"pid,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
MetadataRef string `json:"metadata_ref,omitempty"`
MetadataHash string `json:"metadata_hash,omitempty"`
APIEncodingRef string `json:"api_encoding_ref,omitempty"`
APIEncodingHash string `json:"api_encoding_hash,omitempty"`
AppRevision string `json:"app_revision,omitempty"`
}
type StoredAppModelRef ¶ added in v0.2.9
type StoredAppModelRef struct {
Ref string `json:"ref"`
Kind string `json:"kind"`
Hash string `json:"hash"`
AppID string `json:"app_id"`
Root string `json:"root,omitempty"`
AppRevision string `json:"app_revision,omitempty"`
Path string `json:"path,omitempty"`
Bytes int64 `json:"bytes,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type StoredAppSession ¶ added in v0.2.9
type StoredAppSession struct {
RouteID string `json:"route_id,omitempty"`
ID string `json:"id"`
BaseAppID string `json:"base_app_id,omitempty"`
RuntimeAppID string `json:"runtime_app_id,omitempty"`
SessionID string `json:"session_id,omitempty"`
Name string `json:"name,omitempty"`
Root string `json:"root,omitempty"`
ListenAddr string `json:"listen_addr,omitempty"`
Routes map[string]string `json:"routes,omitempty"`
Aliases map[string]string `json:"aliases,omitempty"`
Offline bool `json:"offline,omitempty"`
Running bool `json:"running,omitempty"`
SessionStatus string `json:"session_status,omitempty"`
SessionStatusReason string `json:"session_status_reason,omitempty"`
Compiling bool `json:"compiling,omitempty"`
CompileError string `json:"compile_error,omitempty"`
PID string `json:"pid,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
MetadataRef string `json:"metadata_ref,omitempty"`
MetadataHash string `json:"metadata_hash,omitempty"`
APIEncodingRef string `json:"api_encoding_ref,omitempty"`
APIEncodingHash string `json:"api_encoding_hash,omitempty"`
AppRevision string `json:"app_revision,omitempty"`
}
type StoredRequest ¶
type StoredRequestData ¶
type StoredRequestData struct {
Method string `json:"method"`
PathParams json.RawMessage `json:"pathParams"`
Payload json.RawMessage `json:"payload"`
}
type TraceEvent ¶
type TraceEvent = devreport.TraceEvent
type TraceQuery ¶
type TraceSummary ¶
type TraceSummary = devreport.TraceSummary
Click to show internal directories.
Click to hide internal directories.