github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/type/token_bucket.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.16.0 5 // source: envoy/type/token_bucket.proto 6 7 package envoy_type 8 9 import ( 10 _ "github.com/cncf/xds/go/udpa/annotations" 11 _ "github.com/envoyproxy/protoc-gen-validate/validate" 12 proto "github.com/golang/protobuf/proto" 13 duration "github.com/golang/protobuf/ptypes/duration" 14 wrappers "github.com/golang/protobuf/ptypes/wrappers" 15 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 16 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 17 reflect "reflect" 18 sync "sync" 19 ) 20 21 const ( 22 // Verify that this generated code is sufficiently up-to-date. 23 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 24 // Verify that runtime/protoimpl is sufficiently up-to-date. 25 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 26 ) 27 28 // This is a compile-time assertion that a sufficiently up-to-date version 29 // of the legacy proto package is being used. 30 const _ = proto.ProtoPackageIsVersion4 31 32 // Configures a token bucket, typically used for rate limiting. 33 type TokenBucket struct { 34 state protoimpl.MessageState 35 sizeCache protoimpl.SizeCache 36 unknownFields protoimpl.UnknownFields 37 38 // The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket 39 // initially contains. 40 MaxTokens uint32 `protobuf:"varint,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` 41 // The number of tokens added to the bucket during each fill interval. If not specified, defaults 42 // to a single token. 43 TokensPerFill *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=tokens_per_fill,json=tokensPerFill,proto3" json:"tokens_per_fill,omitempty"` 44 // The fill interval that tokens are added to the bucket. During each fill interval 45 // `tokens_per_fill` are added to the bucket. The bucket will never contain more than 46 // `max_tokens` tokens. 47 FillInterval *duration.Duration `protobuf:"bytes,3,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"` 48 } 49 50 func (x *TokenBucket) Reset() { 51 *x = TokenBucket{} 52 if protoimpl.UnsafeEnabled { 53 mi := &file_envoy_type_token_bucket_proto_msgTypes[0] 54 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 55 ms.StoreMessageInfo(mi) 56 } 57 } 58 59 func (x *TokenBucket) String() string { 60 return protoimpl.X.MessageStringOf(x) 61 } 62 63 func (*TokenBucket) ProtoMessage() {} 64 65 func (x *TokenBucket) ProtoReflect() protoreflect.Message { 66 mi := &file_envoy_type_token_bucket_proto_msgTypes[0] 67 if protoimpl.UnsafeEnabled && x != nil { 68 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 69 if ms.LoadMessageInfo() == nil { 70 ms.StoreMessageInfo(mi) 71 } 72 return ms 73 } 74 return mi.MessageOf(x) 75 } 76 77 // Deprecated: Use TokenBucket.ProtoReflect.Descriptor instead. 78 func (*TokenBucket) Descriptor() ([]byte, []int) { 79 return file_envoy_type_token_bucket_proto_rawDescGZIP(), []int{0} 80 } 81 82 func (x *TokenBucket) GetMaxTokens() uint32 { 83 if x != nil { 84 return x.MaxTokens 85 } 86 return 0 87 } 88 89 func (x *TokenBucket) GetTokensPerFill() *wrappers.UInt32Value { 90 if x != nil { 91 return x.TokensPerFill 92 } 93 return nil 94 } 95 96 func (x *TokenBucket) GetFillInterval() *duration.Duration { 97 if x != nil { 98 return x.FillInterval 99 } 100 return nil 101 } 102 103 var File_envoy_type_token_bucket_proto protoreflect.FileDescriptor 104 105 var file_envoy_type_token_bucket_proto_rawDesc = []byte{ 106 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x6f, 0x6b, 107 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 108 0x0a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 109 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 110 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 111 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 112 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 113 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 114 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 115 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 116 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x01, 0x0a, 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 117 0x6b, 0x65, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 118 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 119 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x74, 120 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x6c, 0x18, 0x02, 121 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 122 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 123 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 124 0x65, 0x6e, 0x73, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x6c, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x69, 125 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 126 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 127 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 128 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 129 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x36, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 130 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 131 0x70, 0x65, 0x42, 0x10, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, 132 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 133 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 134 } 135 136 var ( 137 file_envoy_type_token_bucket_proto_rawDescOnce sync.Once 138 file_envoy_type_token_bucket_proto_rawDescData = file_envoy_type_token_bucket_proto_rawDesc 139 ) 140 141 func file_envoy_type_token_bucket_proto_rawDescGZIP() []byte { 142 file_envoy_type_token_bucket_proto_rawDescOnce.Do(func() { 143 file_envoy_type_token_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_token_bucket_proto_rawDescData) 144 }) 145 return file_envoy_type_token_bucket_proto_rawDescData 146 } 147 148 var file_envoy_type_token_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 149 var file_envoy_type_token_bucket_proto_goTypes = []interface{}{ 150 (*TokenBucket)(nil), // 0: envoy.type.TokenBucket 151 (*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value 152 (*duration.Duration)(nil), // 2: google.protobuf.Duration 153 } 154 var file_envoy_type_token_bucket_proto_depIdxs = []int32{ 155 1, // 0: envoy.type.TokenBucket.tokens_per_fill:type_name -> google.protobuf.UInt32Value 156 2, // 1: envoy.type.TokenBucket.fill_interval:type_name -> google.protobuf.Duration 157 2, // [2:2] is the sub-list for method output_type 158 2, // [2:2] is the sub-list for method input_type 159 2, // [2:2] is the sub-list for extension type_name 160 2, // [2:2] is the sub-list for extension extendee 161 0, // [0:2] is the sub-list for field type_name 162 } 163 164 func init() { file_envoy_type_token_bucket_proto_init() } 165 func file_envoy_type_token_bucket_proto_init() { 166 if File_envoy_type_token_bucket_proto != nil { 167 return 168 } 169 if !protoimpl.UnsafeEnabled { 170 file_envoy_type_token_bucket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 171 switch v := v.(*TokenBucket); i { 172 case 0: 173 return &v.state 174 case 1: 175 return &v.sizeCache 176 case 2: 177 return &v.unknownFields 178 default: 179 return nil 180 } 181 } 182 } 183 type x struct{} 184 out := protoimpl.TypeBuilder{ 185 File: protoimpl.DescBuilder{ 186 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 187 RawDescriptor: file_envoy_type_token_bucket_proto_rawDesc, 188 NumEnums: 0, 189 NumMessages: 1, 190 NumExtensions: 0, 191 NumServices: 0, 192 }, 193 GoTypes: file_envoy_type_token_bucket_proto_goTypes, 194 DependencyIndexes: file_envoy_type_token_bucket_proto_depIdxs, 195 MessageInfos: file_envoy_type_token_bucket_proto_msgTypes, 196 }.Build() 197 File_envoy_type_token_bucket_proto = out.File 198 file_envoy_type_token_bucket_proto_rawDesc = nil 199 file_envoy_type_token_bucket_proto_goTypes = nil 200 file_envoy_type_token_bucket_proto_depIdxs = nil 201 }