MM-12193: remove auto unmarshalling (#9519)
* MM-12193: remove auto configuration unmarshalling Since plugin hook events are called concurrently, there's no way for the plugin framework to coordinate safe access to the automatically unmarshalled configuration fields. Remove this functionality, and update documentation to illustrate a safe way to do this. * better Fprint example * fix unit tests * log when OnConfigurationChange fails through OnActivate * clarify lifecycle when OnConfigurationChange returns an error * call SetAPI even if OnConfigurationChange not implemented
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b6835ab984
Коммит
580b546862
@@ -12,7 +12,7 @@ type HelloWorldPlugin struct {
|
||||
}
|
||||
|
||||
func (p *HelloWorldPlugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w, "Hello, world!")
|
||||
fmt.Fprint(w, "Hello, world!")
|
||||
}
|
||||
|
||||
// This example demonstrates a plugin that handles HTTP requests which respond by greeting the
|
||||
|
||||
Ссылка в новой задаче
Block a user