// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/extensions/dynamic_modules/v3/dynamic_modules.proto

package dynamic_modulesv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Configuration of a dynamic module. A dynamic module is a shared object file that can be loaded via
// “dlopen“ by various Envoy extension points.
//
// How a module is loaded is determined by the extension point that uses it. For example, the HTTP
// filter loads the module when Envoy receives a configuration that references the module. If loading
// the module fails, the configuration will be rejected.
//
// A module is uniquely identified by its file path and the file's inode, depending on the platform.
// Notably, if the file path and the content of the file are the same, the shared object will be
// reused.
//
// A module must be compatible with the ABI specified in :repo:`abi.h
// <source/extensions/dynamic_modules/abi/abi.h>`. Currently, compatibility is only guaranteed by an
// exact version match between the Envoy codebase and the dynamic module SDKs. In the future, after
// the ABI is stabilized, this restriction will be revisited. Until then, Envoy checks the hash of
// the ABI header files to ensure that the dynamic modules are built against the same version of the
// ABI.
// [#next-free-field: 8]
type DynamicModuleConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name of the dynamic module.
	//
	// The client is expected to have some configuration indicating where to search for the module. In
	// Envoy, the search path can be configured via the environment variable
	// “ENVOY_DYNAMIC_MODULES_SEARCH_PATH“. The actual search path is
	// “${ENVOY_DYNAMIC_MODULES_SEARCH_PATH}/lib${name}.so“. If not set, the current working directory is
	// used as the search path. After Envoy fails to find the module in the search path, it will also
	// try to find the module from a standard system library path (e.g., “/usr/lib“) following the
	// platform's default behavior for “dlopen“.
	//
	// This field is optional if the “module“ field is set. When both “name“ and “module“ are
	// specified, the “module“ field takes precedence.
	//
	// .. note::
	//
	//	There is some remaining work to make the search path configurable via command line options.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// If true, prevents the module from being unloaded with “dlclose“.
	//
	// This is useful for modules that have global state that should not be unloaded. A module is
	// closed when no more references to it exist in the process. For example, no HTTP filters are
	// using the module (e.g. after configuration update).
	//
	// Defaults to “false“.
	DoNotClose bool `protobuf:"varint,3,opt,name=do_not_close,json=doNotClose,proto3" json:"do_not_close,omitempty"`
	// If “true“, the dynamic module is loaded with the “RTLD_GLOBAL“ flag.
	//
	// The dynamic module is loaded with the “RTLD_LOCAL“ flag by default to avoid symbol conflicts
	// when multiple modules are loaded. Set this to “true“ to load the module with the
	// “RTLD_GLOBAL“ flag. This is useful for modules that need to share symbols with other dynamic
	// libraries. For example, a module X may load another shared library Y that depends on some
	// symbols defined in module X. In this case, module X must be loaded with the “RTLD_GLOBAL“
	// flag so that the symbols defined in module X are visible to library Y.
	//
	// .. warning::
	//
	//	Use this option with caution as it may lead to symbol conflicts and undefined behavior if
	//	multiple modules define the same symbols and are loaded globally.
	//
	// Defaults to “false“.
	LoadGlobally bool `protobuf:"varint,4,opt,name=load_globally,json=loadGlobally,proto3" json:"load_globally,omitempty"`
	// The namespace prefix for metrics emitted by this dynamic module.
	//
	// This allows users to customize the prefix used for all metrics created by the dynamic module.
	// The prefix is prepended to all metric names. In prometheus output, metrics will appear with
	// the standard “envoy_“ prefix followed by this namespace. For example, if this is set to
	// “myapp“, a counter “requests“ would appear as “envoy_myapp_requests_total“.
	//
	// Defaults to “dynamicmodulescustom“.
	MetricsNamespace string `protobuf:"bytes,5,opt,name=metrics_namespace,json=metricsNamespace,proto3" json:"metrics_namespace,omitempty"`
	// The dynamic module binary to load. Supports local file paths via “local.filename“
	// and remote HTTP sources via “remote“.
	//
	// When using “remote“, the module is fetched asynchronously during listener initialization.
	// If the fetch fails (network error, SHA256 mismatch, invalid binary, etc.), the filter
	// is **not installed** and requests pass through unfiltered (fail-open).
	//
	// When both “name“ and “module“ are set, “module“ takes precedence.
	Module *v3.AsyncDataSource `protobuf:"bytes,6,opt,name=module,proto3" json:"module,omitempty"`
	// Controls how a cache miss for a remote module is handled.
	//
	// When true (NACK mode), a cache miss causes an immediate NACK of the xDS config update.
	// A background fetch is started and the module will be available on the next config push if
	// the fetch succeeds.
	//
	// When false (default, warming mode), the server blocks during initialization until the fetch
	// completes or exhausts retries. This mode requires an init manager and is not available in
	// ECDS or per-route configurations.
	//
	// When using “module.remote“ with ECDS or per-route configurations, this must be set to
	// “true“.
	//
	// Only applies when “module.remote“ is set.
	//
	// Defaults to “false“.
	NackOnCacheMiss bool `protobuf:"varint,7,opt,name=nack_on_cache_miss,json=nackOnCacheMiss,proto3" json:"nack_on_cache_miss,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

func (x *DynamicModuleConfig) Reset() {
	*x = DynamicModuleConfig{}
	mi := &file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *DynamicModuleConfig) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DynamicModuleConfig) ProtoMessage() {}

func (x *DynamicModuleConfig) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use DynamicModuleConfig.ProtoReflect.Descriptor instead.
func (*DynamicModuleConfig) Descriptor() ([]byte, []int) {
	return file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDescGZIP(), []int{0}
}

func (x *DynamicModuleConfig) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *DynamicModuleConfig) GetDoNotClose() bool {
	if x != nil {
		return x.DoNotClose
	}
	return false
}

func (x *DynamicModuleConfig) GetLoadGlobally() bool {
	if x != nil {
		return x.LoadGlobally
	}
	return false
}

func (x *DynamicModuleConfig) GetMetricsNamespace() string {
	if x != nil {
		return x.MetricsNamespace
	}
	return ""
}

func (x *DynamicModuleConfig) GetModule() *v3.AsyncDataSource {
	if x != nil {
		return x.Module
	}
	return nil
}

func (x *DynamicModuleConfig) GetNackOnCacheMiss() bool {
	if x != nil {
		return x.NackOnCacheMiss
	}
	return false
}

var File_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto protoreflect.FileDescriptor

const file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDesc = "" +
	"\n" +
	"9envoy/extensions/dynamic_modules/v3/dynamic_modules.proto\x12#envoy.extensions.dynamic_modules.v3\x1a\x1fenvoy/config/core/v3/base.proto\x1a\x1dudpa/annotations/status.proto\"\x89\x02\n" +
	"\x13DynamicModuleConfig\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12 \n" +
	"\fdo_not_close\x18\x03 \x01(\bR\n" +
	"doNotClose\x12#\n" +
	"\rload_globally\x18\x04 \x01(\bR\floadGlobally\x12+\n" +
	"\x11metrics_namespace\x18\x05 \x01(\tR\x10metricsNamespace\x12=\n" +
	"\x06module\x18\x06 \x01(\v2%.envoy.config.core.v3.AsyncDataSourceR\x06module\x12+\n" +
	"\x12nack_on_cache_miss\x18\a \x01(\bR\x0fnackOnCacheMissB\xb0\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"1io.envoyproxy.envoy.extensions.dynamic_modules.v3B\x13DynamicModulesProtoP\x01Z\\github.com/envoyproxy/go-control-plane/envoy/extensions/dynamic_modules/v3;dynamic_modulesv3b\x06proto3"

var (
	file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDescOnce sync.Once
	file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDescData []byte
)

func file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDescGZIP() []byte {
	file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDesc), len(file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDesc)))
	})
	return file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDescData
}

var file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_goTypes = []any{
	(*DynamicModuleConfig)(nil), // 0: envoy.extensions.dynamic_modules.v3.DynamicModuleConfig
	(*v3.AsyncDataSource)(nil),  // 1: envoy.config.core.v3.AsyncDataSource
}
var file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.dynamic_modules.v3.DynamicModuleConfig.module:type_name -> envoy.config.core.v3.AsyncDataSource
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_init() }
func file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_init() {
	if File_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDesc), len(file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_msgTypes,
	}.Build()
	File_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto = out.File
	file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_goTypes = nil
	file_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto_depIdxs = nil
}
