...

Source file src/github.com/chaos-mesh/chaos-mesh/pkg/webhook/config/watcher/message.go

Documentation: github.com/chaos-mesh/chaos-mesh/pkg/webhook/config/watcher

     1  // Copyright 2019 Chaos Mesh Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // See the License for the specific language governing permissions and
    12  // limitations under the License.
    13  
    14  package watcher
    15  
    16  import (
    17  	"github.com/chaos-mesh/chaos-mesh/pkg/webhook/config"
    18  )
    19  
    20  // Message is a message that describes a change and payload to a sidecar configuration
    21  type Message struct {
    22  	Event           Event
    23  	InjectionConfig config.InjectionConfig
    24  }
    25  
    26  // Event is what happened to the config (add/delete/update)
    27  type Event uint8
    28  
    29  const (
    30  	// EventAdd is a new ConfigMap
    31  	EventAdd Event = iota
    32  	// EventUpdate is an Updated ConfigMap
    33  	EventUpdate
    34  	// EventDelete is a deleted ConfigMap
    35  	EventDelete
    36  )
    37