config.go 241 B

123456789101112131415
  1. package policy
  2. import (
  3. "time"
  4. "github.com/golang/protobuf/proto"
  5. )
  6. func (s *Second) Duration() time.Duration {
  7. return time.Second * time.Duration(s.Value)
  8. }
  9. func (p *Policy) OverrideWith(another *Policy) {
  10. proto.Merge(p, another)
  11. }