Support mirroring request body
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com> Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com>
This commit is contained in:
parent
09c07f45ee
commit
cf7f0f878a
20 changed files with 454 additions and 44 deletions
|
@ -58,8 +58,15 @@ type RouterTLSConfig struct {
|
|||
|
||||
// Mirroring holds the Mirroring configuration.
|
||||
type Mirroring struct {
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty"`
|
||||
Mirrors []MirrorService `json:"mirrors,omitempty" toml:"mirrors,omitempty" yaml:"mirrors,omitempty"`
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty"`
|
||||
MaxBodySize *int64 `json:"maxBodySize,omitempty" toml:"maxBodySize,omitempty" yaml:"maxBodySize,omitempty"`
|
||||
Mirrors []MirrorService `json:"mirrors,omitempty" toml:"mirrors,omitempty" yaml:"mirrors,omitempty"`
|
||||
}
|
||||
|
||||
// SetDefaults Default values for a WRRService.
|
||||
func (m *Mirroring) SetDefaults() {
|
||||
var defaultMaxBodySize int64 = -1
|
||||
m.MaxBodySize = &defaultMaxBodySize
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen=true
|
||||
|
|
|
@ -762,6 +762,11 @@ func (in *MirrorService) DeepCopy() *MirrorService {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Mirroring) DeepCopyInto(out *Mirroring) {
|
||||
*out = *in
|
||||
if in.MaxBodySize != nil {
|
||||
in, out := &in.MaxBodySize, &out.MaxBodySize
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.Mirrors != nil {
|
||||
in, out := &in.Mirrors, &out.Mirrors
|
||||
*out = make([]MirrorService, len(*in))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue