Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Activity ¶
type Activity struct {
ID string `json:"id"`
Type ActivityType `json:"type"`
Actor string `json:"actor"`
Resource string `json:"resource"`
Server string `json:"server"`
Command string `json:"command,omitempty"`
Output string `json:"output,omitempty"`
Error string `json:"error,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Duration time.Duration `json:"duration,omitempty"`
Timestamp time.Time `json:"timestamp"`
}
Activity represents a logged activity
type ActivityType ¶
type ActivityType string
ActivityType represents the type of activity
const ( ActivityServerProvisioned ActivityType = "server.provisioned" ActivityServerConnected ActivityType = "server.connected" ActivityDeploymentStarted ActivityType = "deployment.started" ActivityDeploymentCompleted ActivityType = "deployment.completed" ActivityDeploymentFailed ActivityType = "deployment.failed" ActivityResourceDeleted ActivityType = "resource.deleted" ActivityCommandExecuted ActivityType = "command.executed" ActivityTakodMeshPrepared ActivityType = "takod.mesh.prepared" ActivityNodeJoined ActivityType = "node.joined" )
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
FileLogger logs activities to JSON files
func NewFileLogger ¶
func NewFileLogger(basePath string) (*FileLogger, error)
NewFileLogger creates a new file-based activity logger
func (*FileLogger) Close ¶
func (l *FileLogger) Close() error
Close closes the logger (noop for file logger)
func (*FileLogger) Log ¶
func (l *FileLogger) Log(activity *Activity) error
Log writes an activity to the log file
Click to show internal directories.
Click to hide internal directories.