Help us shape the future of Go! Take the 2026 Go Developer Survey

logs

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableAutomaticBackups

func DisableAutomaticBackups(client *golangsdk.ServiceClient, clusterID string) error

DisableAutomaticBackups function will disable the automatic log backup policy for a CSS cluster.

func DisableLogs

func DisableLogs(client *golangsdk.ServiceClient, clusterID string) error

DisableLogs function will disable the log option for a CSS cluster.

func EnableAutomaticBackups

func EnableAutomaticBackups(client *golangsdk.ServiceClient, clusterID string, opts EnableAutomaticBackupOpts) error

EnableAutomaticBackups will enable the automatic log backup policy for the cluster based on EnableAutomaticBackupOpts.

func EnableLogs

func EnableLogs(client *golangsdk.ServiceClient, clusterID string, opts EnableLogsOpts) error

EnableLogs function is used to enable the log switch of a CSS cluster base on EnableLogsOpts.

func UpdateLogs

func UpdateLogs(client *golangsdk.ServiceClient, clusterID string, opts UpdateLogConfigurationOpts) error

UpdateLogs will change the cluster logging configurations based on UpdateLogConfigurationOpts.

Types

type EnableAutomaticBackupOpts

type EnableAutomaticBackupOpts struct {
	// This parameter passed to the logs.EnableAutomaticBackups function.
	// Period is the start time of a backup job.
	Period string `json:"period" required:"true"`
}

type EnableLogsOpts

type EnableLogsOpts struct {
	// These parameters are passed to the logs.EnableLogs function.
	// Agency is the agency name used for the css cluster.
	Agency string `json:"agency" required:"true"`
	// BasePath is the obs path where the logs should be stored for the css cluster.
	BasePath string `json:"logBasePath" required:"true"`
	// Bucket is the obs bucket name to store the logs for the css cluster.
	Bucket string `json:"logBucket" required:"true"`
}

type LogConfiguration

type LogConfiguration struct {
	// These parameters are passed to the logs.GetLogConfiguration function.
	// Log backup ID.
	ID string `json:"id"`
	// CSS cluster ID.
	ClusterID string `json:"clusterId"`
	// The bucket where the logs should be stored.
	ObsBucket string `json:"obsBucket"`
	// The agency name.
	Agency string `json:"agency"`
	// Update time.
	UpdateAt int `json:"updateAt"`
	// Storage path of backup logs in the OBS bucket.
	BasePath string `json:"basePath"`
	// Indicates whether to enable automatic backup.
	AutoEnable bool `json:"autoEnable"`
	// Start time of automatic log backup.
	Period string `json:"period"`
	// Indicates whether to enable the log function.
	LogSwitch bool `json:"logSwitch"`
}

func GetConfiguration

func GetConfiguration(client *golangsdk.ServiceClient, clusterID string) (*LogConfiguration, error)

GetConfiguration function will query the details of CSS cluster logging and returns a LogConfiguration object.

type UpdateLogConfigurationOpts

type UpdateLogConfigurationOpts struct {
	// These parameters are passed to the logs.UpdateLogs function.
	// Agency is the agency name used for the css cluster.
	Agency string `json:"agency" required:"true"`
	// BasePath is the obs path where the logs should be stored for the css cluster.
	BasePath string `json:"logBasePath" required:"true"`
	// Bucket is the obs bucket name to store the logs for the css cluster.
	Bucket string `json:"logBucket" required:"true"`
}

Jump to

Keyboard shortcuts

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