Merge pull request #8142 from davidhsingyuchen/docs-logger-func

docs: add more comment to logging.LoggerFunc
This commit is contained in:
Kazuyoshi Kato 2023-02-23 08:38:11 -08:00 committed by GitHub
commit a8a35cab22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,5 +29,9 @@ type Config struct {
Stderr io.Reader
}
// LoggerFunc is implemented by custom v2 logging binaries
type LoggerFunc func(context.Context, *Config, func() error) error
// LoggerFunc is implemented by custom v2 logging binaries.
//
// ready should be called when the logging binary finishes its setup and the container can be started.
//
// An example implementation of LoggerFunc: https://github.com/containerd/containerd/tree/main/runtime/v2#logging
type LoggerFunc func(ctx context.Context, cfg *Config, ready func() error) error