Add mirrorBody option to HTTP mirroring
This commit is contained in:
parent
51f7f610c9
commit
eb99c8c785
19 changed files with 165 additions and 22 deletions
|
@ -81,6 +81,7 @@ type RouterTLSConfig struct {
|
|||
// Mirroring holds the Mirroring configuration.
|
||||
type Mirroring struct {
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty" export:"true"`
|
||||
MirrorBody *bool `json:"mirrorBody,omitempty" toml:"mirrorBody,omitempty" yaml:"mirrorBody,omitempty" export:"true"`
|
||||
MaxBodySize *int64 `json:"maxBodySize,omitempty" toml:"maxBodySize,omitempty" yaml:"maxBodySize,omitempty" export:"true"`
|
||||
Mirrors []MirrorService `json:"mirrors,omitempty" toml:"mirrors,omitempty" yaml:"mirrors,omitempty" export:"true"`
|
||||
HealthCheck *HealthCheck `json:"healthCheck,omitempty" toml:"healthCheck,omitempty" yaml:"healthCheck,omitempty" label:"allowEmpty" file:"allowEmpty" kv:"allowEmpty" export:"true"`
|
||||
|
@ -88,6 +89,8 @@ type Mirroring struct {
|
|||
|
||||
// SetDefaults Default values for a WRRService.
|
||||
func (m *Mirroring) SetDefaults() {
|
||||
defaultMirrorBody := true
|
||||
m.MirrorBody = &defaultMirrorBody
|
||||
var defaultMaxBodySize int64 = -1
|
||||
m.MaxBodySize = &defaultMaxBodySize
|
||||
}
|
||||
|
|
|
@ -967,6 +967,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.MirrorBody != nil {
|
||||
in, out := &in.MirrorBody, &out.MirrorBody
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.MaxBodySize != nil {
|
||||
in, out := &in.MaxBodySize, &out.MaxBodySize
|
||||
*out = new(int64)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue