Documentation
¶
Index ¶
- func CheckServiceLogsLastHour(clusterId string) bool
- func FetchServiceLogs(clusterID string, allMessages bool, internalOnly bool) (*v1.ClustersClusterLogsListResponse, error)
- func GetServiceLogsSince(clusterID string, timeSince time.Time, allMessages bool, internalOnly bool) ([]*v1.LogEntry, error)
- func NewCmdServiceLog() *cobra.Command
- type LogEntryResponseView
- type LogEntryView
- type PostCmdOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckServiceLogsLastHour ¶ added in v0.25.0
CheckServiceLogsLastHour returns true if there were servicelogs sent in the past hour, otherwise false
func FetchServiceLogs ¶ added in v0.10.0
func GetServiceLogsSince ¶ added in v0.18.0
func GetServiceLogsSince(clusterID string, timeSince time.Time, allMessages bool, internalOnly bool) ([]*v1.LogEntry, error)
GetServiceLogsSince returns the service logs for a cluster sent between time.Now() and time.Now()-duration. the first parameter will contain a slice of the service logs from the given time period, while the second return value indicates if an error has happened.
func NewCmdServiceLog ¶
Types ¶
type LogEntryResponseView ¶ added in v0.19.0
type LogEntryResponseView struct {
Items []*LogEntryView `json:"items"`
Kind string `json:"kind"`
Page int `json:"page"`
Size int `json:"size"`
Total int `json:"total"`
}
type LogEntryView ¶ added in v0.19.0
type LogEntryView struct {
ClusterID string `json:"cluster_id"`
ClusterUUID string `json:"cluster_uuid"`
CreatedAt time.Time `json:"created_at"`
CreatedBy string `json:"created_by"`
Description string `json:"description"`
DocReferences []string `json:"doc_references"`
EventStreamID string `json:"event_stream_id"`
Href string `json:"href"`
ID string `json:"id"`
InternalOnly bool `json:"internal_only"`
Kind string `json:"kind"`
LogType string `json:"log_type"`
ServiceName string `json:"service_name"`
Severity string `json:"severity"`
Summary string `json:"summary"`
Timestamp time.Time `json:"timestamp"`
Username string `json:"username"`
}
type PostCmdOptions ¶ added in v0.14.1
type PostCmdOptions struct {
Message servicelog.Message
ClustersFile servicelog.ClustersFile
Template string
TemplateParams []string
Overrides []string
InternalOnly bool
ClusterId string
// contains filtered or unexported fields
}
func (*PostCmdOptions) FindLeftovers ¶ added in v0.14.1
func (o *PostCmdOptions) FindLeftovers(s string) (matches []string)
func (*PostCmdOptions) Init ¶ added in v0.14.1
func (o *PostCmdOptions) Init() error
func (*PostCmdOptions) Run ¶ added in v0.14.1
func (o *PostCmdOptions) Run() error
func (*PostCmdOptions) Validate ¶ added in v0.14.1
func (o *PostCmdOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.