INNER CODE UNIT · Go

func

offen/docker-volume-backup · cmd/backup/config.go:128

func (c *CompressionType) Decode(v string) error {
	switch v {
	case "none", "gz", "zst":
		*c = CompressionType(v)
		return nil
	default:
		return errwrap.Wrap(nil, fmt.Sprintf("unknown compression type '%s', expected one of 'none', 'gz', 'zst'", v))
	}
}

func (c *CompressionType) String() string {
	return string(*c)
}

// MatchBehavior controls how the value of a container's stop-during-backup
// label is matched against the value configured on this instance. With "match"
// the values have to be equal. With "one-of" the container's label value is
// split on BACKUP_LABEL_MATCH_SEPARATOR (a comma by default) so a single

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…