Documentation ¶
Overview ¶
Package tools contains utilities for Beam bootloader containers, such as for obtaining runtime provision information -- such as pipeline options. or for logging to the log service.
For Beam Internal use.
Index ¶
- func JSONToProto(data string) (*google_pb.Struct, error)
- func OptionsToProto(v any) (*google_pb.Struct, error)
- func ProtoToJSON(opt *google_pb.Struct) (string, error)
- func ProtoToOptions(opt *google_pb.Struct, v any) error
- func ProvisionInfo(ctx context.Context, endpoint string) (*fnpb.ProvisionInfo, error)
- type Logger
- func (l *Logger) Close()
- func (l *Logger) Fatalf(ctx context.Context, format string, args ...any)
- func (l *Logger) Log(ctx context.Context, sev fnpb.LogEntry_Severity_Enum, message string)
- func (l *Logger) Printf(ctx context.Context, format string, args ...any)
- func (l *Logger) Warnf(ctx context.Context, format string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONToProto ¶
JSONToProto converts JSON-encoded pipeline options to a proto struct.
func OptionsToProto ¶
OptionsToProto converts pipeline options to a proto struct via JSON.
func ProtoToJSON ¶
ProtoToJSON converts pipeline options from a proto struct to JSON.
func ProtoToOptions ¶
ProtoToOptions converts pipeline options from a proto struct via JSON.
func ProvisionInfo ¶
ProvisionInfo returns the runtime provisioning info for the worker.
Types ¶
type Logger ¶
type Logger struct { Endpoint string // contains filtered or unexported fields }
Logger is a wrapper around the FnAPI Logging Client, intended for container boot loader use. Not intended for Beam end users.