logs

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterOptions

type FilterOptions struct {
	ProjectID   string    // Google Cloudプロジェクトのプロジェクトid
	ServiceName string    // Cloud Runのサービス名
	StartTime   time.Time // ログの開始時間
	EndTime     time.Time // ログの終了時間
	LogLevel    string    // ログレベル(INFO, ERROR, WARNINGなど)
	Keywords    []string  // 検索キーワード
	Limit       int       // 取得するログエントリの最大数
}

FilterOptions は、ログのフィルタリングオプションを定義します

type LogEntry

type LogEntry struct {
	Timestamp time.Time
	Severity  string
	Message   string
	Labels    map[string]string
}

LogEntry はログエントリを表します

func GetCloudRunLogs

func GetCloudRunLogs(ctx context.Context, opts FilterOptions) ([]LogEntry, error)

GetCloudRunLogs は指定されたフィルターオプションに基づいてCloud Runのログを取得します

type ServiceInfo

type ServiceInfo struct {
	Name        string
	Description string
	URL         string
	Status      string
	Region      string
	CreateTime  time.Time
	UpdateTime  time.Time
}

ServiceInfo はCloud Runのサービス情報を表します

func GetCloudRunServices

func GetCloudRunServices(ctx context.Context, projectID string, region string) ([]ServiceInfo, error)

GetCloudRunServices はプロジェクトIDを指定してCloud Runのサービス一覧を取得します

Jump to

Keyboard shortcuts

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