github.com/looshlee/beatles@v0.0.0-20220727174639-742810ab631c/pkg/kvstore/logfields.go (about)

     1  // Copyright 2016-2018 Authors of Cilium
     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  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package kvstore
    16  
    17  import (
    18  	"github.com/cilium/cilium/pkg/logging"
    19  	"github.com/cilium/cilium/pkg/logging/logfields"
    20  )
    21  
    22  var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "kvstore")
    23  
    24  const (
    25  	// fieldKVStoreModule is the name of the kvstore backend (etcd or consul)
    26  	fieldKVStoreModule = "module"
    27  
    28  	// name of watcher
    29  	fieldWatcher = "watcher"
    30  
    31  	// key revision
    32  	fieldRev = "revision"
    33  
    34  	// fieldSession refers to a connection/session with the kvstore
    35  	fieldSession = "session"
    36  
    37  	// fieldPrefix is the prefix of the key used in the operation
    38  	fieldPrefix = "prefix"
    39  
    40  	// fieldKey is the prefix of the key used in the operation
    41  	fieldKey = "key"
    42  
    43  	// fieldValue is the prefix of the key used in the operation
    44  	fieldValue = "value"
    45  
    46  	// fieldCondition is the condition that requires to be met
    47  	fieldCondition = "condition"
    48  
    49  	// fieldNumEntries is the number of entries in the result
    50  	fieldNumEntries = "numEntries"
    51  
    52  	// fieldAttachLease is true if the key must be attached to a lease
    53  	fieldAttachLease = "attachLease"
    54  
    55  	// fieldEtcdEndpoint is the etcd endpoint we talk to
    56  	fieldEtcdEndpoint = "etcdEndpoint"
    57  )