Documentation ¶
Index ¶
- Constants
- func AudienceEquals(a, b *protos.Audience) bool
- func AudienceFromStr(s string) *protos.Audience
- func AudienceToStr(audience *protos.Audience) string
- func BoolPtr(in bool) *bool
- func ConvertConfigStrAudience(config map[*protos.Audience][]string) map[string]*protos.GetAllResponsePipelines
- func CounterName(name string, labels map[string]string) string
- func CtxMetadata(ctx context.Context) map[string]string
- func CtxRequestId(ctx context.Context) string
- func CtxStringValue(ctx context.Context, key string) string
- func GenInferSchemaPipeline(aud *protos.Audience) *protos.Command
- func GenerateKVRequest(action shared.KVAction, kvs []*protos.KVObject, overwrite bool) *protos.KVRequest
- func GenerateUUID() string
- func GenerateWasmMapping(commands ...*protos.Command) map[string]*protos.WasmModule
- func ParseConfigKey(key string) (*protos.Audience, string)
- func PopulateWASMFields(pipeline *protos.Pipeline, prefix string) error
- func PtrStr(s *string) string
- func StandardResponse(ctx context.Context, code protos.ResponseCode, msg string) *protos.StandardResponse
- func StringPtr(in string) *string
- func StripWASMFields(pipeline *protos.Pipeline)
Constants ¶
const (
GRPCRequestIDMetadataKey = "request-id"
)
Variables ¶
This section is empty.
Functions ¶
func AudienceEquals ¶
func AudienceFromStr ¶
AudienceFromStr will parse a string into an Audience. If the string is invalid, nil will be returned.
func AudienceToStr ¶
func CtxMetadata ¶
CtxMetadata will return a map[string]string of the metadata in the given context (if md exists). NOTE: Will use only first value in metadata value slice.
func CtxRequestId ¶
func GenerateKVRequest ¶
func GenerateKVRequest(action shared.KVAction, kvs []*protos.KVObject, overwrite bool) *protos.KVRequest
GenerateKVRequest is used for converting from plain KVObjects to instructions. This func is used to simplify transforming KV HTTP requests -> KV broadcast requests.
func GenerateUUID ¶
func GenerateUUID() string
func GenerateWasmMapping ¶
func GenerateWasmMapping(commands ...*protos.Command) map[string]*protos.WasmModule
GenerateWasmMapping will generate a map of WASM modules from the given command(s). NOTE: This is primarily useful for commands that have Steps which contain Wasm fields (like AttachCommand). For commands that do not have Steps w/ Wasm, this will do nothing.
func StandardResponse ¶
func StandardResponse(ctx context.Context, code protos.ResponseCode, msg string) *protos.StandardResponse
func StripWASMFields ¶
Types ¶
This section is empty.