servicelog

package
v0.39.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllMessagesFlag      = "all-messages"
	AllMessagesShortFlag = "A"
	InternalFlag         = "internal"
	InternalShortFlag    = "i"
)

Variables

This section is empty.

Functions

func CheckServiceLogsLastHour added in v0.25.0

func CheckServiceLogsLastHour(clusterId string) bool

CheckServiceLogsLastHour returns true if there were servicelogs sent in the past hour, otherwise false

func FetchServiceLogs added in v0.10.0

func FetchServiceLogs(clusterID string, allMessages bool, internalOnly bool) (*v1.ClustersClusterLogsListResponse, error)

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 ListServiceLogs added in v0.19.0

func ListServiceLogs(clusterID string, allMessages bool, internalOnly bool) error

func NewCmdServiceLog

func NewCmdServiceLog() *cobra.Command

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

	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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL