summaryrefslogtreecommitdiff
path: root/service/gzip/config.go
blob: 00ac559db93a392a303952b3a7073c69af5b2c02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package gzip

import (
	"github.com/spiral/roadrunner/service"
)

// Config describes file location and controls access to them.
type Config struct {
	Enable bool
}

// Hydrate must populate Config values using given Config source. Must return error if Config is not valid.
func (c *Config) Hydrate(cfg service.Config) error {
	return cfg.Unmarshal(c)
}

// InitDefaults sets missing values to their default values.
func (c *Config) InitDefaults() error {
	c.Enable = true

	return nil
}