Files
Alex ShtinandGitHub 8e8f1b0f7c Remove license header from every file (#7689)
## What changed?
<!-- Describe what has changed in this PR -->
Remove license header from every file. Because it is really hard to
follow in this PR here is the summary:
1. License header is removed from all `.go` and `.proto` files
:fireworks::fireworks:🎆.
2. `LICENSE` file in the root directory has only Temporal and Uber
copyrights.
3. 5 other `LICENSE` files added to the packages which have copyrights
different from Temporal and Uber: Datadog, Xargin, "Mat Ryer, Tyler
Bunnell and contributors".
4. `license_file` flag is removed from all code generation tools.
5. `copyright_file` flag is removed from `go:generate mockgen`
directive.
6. All copyright related targets are removed from `Makefile`.
7. Updated Temporal copyright year to 2025 everywhere.

## Why?
<!-- Tell your future self why have you made these changes -->
I double checked with legal department that it is not needed to have
license header in every file. One file per repo is enough. I put all
copyrights to the root `LICENSE` file and removed header from all other
files. Also updated tools and `Makefile`.
2025-05-01 18:50:21 -07:00

36 lines
1.3 KiB
Go

//go:generate go run ../../cmd/tools/gendynamicconfig
package dynamicconfig
type (
// Precedence is an enum for the search order precedence of a dynamic config setting.
// E.g., use the global value, check namespace then global, check task queue then
// namespace then global, etc.
Precedence int
// setting is one dynamic config setting. setting should not be used or created directly,
// but use one of the generated constructors for instantiated Setting types in
// setting_gen.go, e.g. NewNamespaceBoolSetting.
// T is the data type of the setting. P is a go type representing the precedence, which is
// just used to make the types more unique.
setting[T any, P any] struct {
key Key // string value of key. case-insensitive.
def T // default value. cdef is used in preference to def if non-nil.
cdef *[]TypedConstrainedValue[T]
convert func(any) (T, error) // converter function
description string // documentation
}
// GenericSetting is an interface that all instances of Setting implement (by generated
// code in setting_gen.go). It can be used to refer to settings of any type and deal with
// them generically..
GenericSetting interface {
Key() Key
Precedence() Precedence
Validate(v any) error
// for internal use:
dispatchUpdate(*Collection, any, []ConstrainedValue)
}
)