Documentation ¶
Index ¶
- Constants
- Variables
- func AddGlobalGRPCDialOption(opt grpc.DialOption)
- func AddGlobalGRPCServerOption(opt grpc.ServerOption)
- func DecryptData(key, data []byte) ([]byte, error)
- func DecryptDataBase64(key []byte, data string) (string, error)
- func EncryptData(key, data []byte) ([]byte, error)
- func EncryptDataBase64(key, data []byte) (string, error)
- func GetEndpointTLS(service string) (*grpc.ClientConn, error)
- func GrpcServerOptions(unaryInterceptor grpc.UnaryServerInterceptor, ...) []grpc.ServerOption
- func GrpcStart(server **grpc.Server, name, bind string, register func(srv *grpc.Server)) error
- func InitTelemetry(addr string, svcName, imName string) (func(), error)
- func MatchesRegex(s string) bool
- func MatchesVarRegex(s string) bool
- func MatchesVarSNameAndSFName(s string) bool
- func Trace(ctx context.Context, msg string)
- func TraceGWHTTPRequest(ctx context.Context, r *http.Request, instrumentationName string) (cleanup func())
- func TraceHTTPRequest(ctx context.Context, r *http.Request) (cleanup func())
- func TransplantTelemetryContextInformation(a, b context.Context) context.Context
- type GenericTelemetryCarrier
Constants ¶
View Source
const ( DirektivDebug = "DIREKTIV_DEBUG" DirektivLogFormat = "DIREKTIV_LOG_FORMAT" DirektivOpentelemetry = "DIREKTIV_OTLP" DirektivFlowEndpoint = "DIREKTIV_FLOW_ENDPOINT" DirektivProxyHTTPS = "HTTPS_PROXY" DirektivProxyHTTP = "HTTP_PROXY" DirektivProxyNO = "NO_PROXY" )
View Source
const ( InstanceStatusPending = "pending" InstanceStatusFailed = "failed" InstanceStatusCrashed = "crashed" InstanceStatusComplete = "complete" InstanceStatusCancelled = "cancelled" )
View Source
const ( RegexPattern = NameRegexPattern VarRegexPattern = VarNameRegexPattern )
View Source
const ( VarScopeNamespace = "namespace" VarScopeWorkflow = "workflow" VarScopeInstance = "instance" VarScopeThread = "thread" VarScopeSystem = "system" VarScopeFileSystem = "file" )
View Source
const (
CallerCron = "cron"
)
View Source
const NameRegexFragment = `(([a-zA-Z][a-zA-Z0-9_\-\.]*[a-zA-Z0-9])|([a-zA-Z]))`
View Source
const NameRegexPattern = `^` + NameRegexFragment + `$`
View Source
const (
PaginationKeyName = "NAME"
)
View Source
const RefRegexFragment = `(([a-zA-Z0-9][a-zA-Z0-9_\-\.]*[a-zA-Z0-9])|([a-zA-Z0-9]))`
View Source
const RefRegexPattern = `^` + RefRegexFragment + `$`
View Source
const URIRegexPattern = `^(` + NameRegexFragment + `[\/]?)*$`
View Source
const VarNameRegexPattern = `^(([a-zA-Z][a-zA-Z0-9_\-\.]*[a-zA-Z0-9])|([a-zA-Z]))$`
View Source
const VarSecretNameAndSecretsFolderNamePattern = `^(([a-zA-Z][a-zA-Z0-9_\-\./]*[a-zA-Z0-9/])|([a-zA-Z/]))$`
Variables ¶
View Source
var NameRegex = regexp.MustCompile(NameRegexPattern)
View Source
var RefRegex = regexp.MustCompile(RefRegexPattern)
View Source
var TelemetryMiddleware = func(h http.Handler) http.Handler {
return h
}
View Source
var URIRegex = regexp.MustCompile(URIRegexPattern)
View Source
var VarNameRegex = regexp.MustCompile(VarNameRegexPattern)
Functions ¶
func AddGlobalGRPCDialOption ¶
func AddGlobalGRPCDialOption(opt grpc.DialOption)
func AddGlobalGRPCServerOption ¶
func AddGlobalGRPCServerOption(opt grpc.ServerOption)
func DecryptData ¶ added in v0.8.0
func DecryptDataBase64 ¶ added in v0.8.0
func EncryptData ¶ added in v0.8.0
func EncryptDataBase64 ¶ added in v0.8.0
func GetEndpointTLS ¶
func GetEndpointTLS(service string) (*grpc.ClientConn, error)
GetEndpointTLS creates a grpc client.
func GrpcServerOptions ¶
func GrpcServerOptions(unaryInterceptor grpc.UnaryServerInterceptor, streamInterceptor grpc.StreamServerInterceptor) []grpc.ServerOption
func InitTelemetry ¶
func MatchesRegex ¶
MatchesRegex responds true if the provided string matches the RegexPattern constant defined in this package.
func MatchesVarRegex ¶
func MatchesVarSNameAndSFName ¶ added in v0.7.1
func TraceGWHTTPRequest ¶ added in v0.8.1
func TraceHTTPRequest ¶
Types ¶
type GenericTelemetryCarrier ¶
func (*GenericTelemetryCarrier) Get ¶
func (c *GenericTelemetryCarrier) Get(key string) string
func (*GenericTelemetryCarrier) Keys ¶
func (c *GenericTelemetryCarrier) Keys() []string
func (*GenericTelemetryCarrier) Set ¶
func (c *GenericTelemetryCarrier) Set(key, val string)
Click to show internal directories.
Click to hide internal directories.