search for: testplugin

Displaying 9 results from an estimated 9 matches for "testplugin".

2020 Apr 24
1
[PATCH nbdkit] golang: Pass Plugin and Connection by reference not value.
...o Zero() function") } diff --git a/plugins/golang/test/test.go b/plugins/golang/test/test.go index 7186ffa8..e585a971 100644 --- a/plugins/golang/test/test.go +++ b/plugins/golang/test/test.go @@ -52,15 +52,15 @@ type TestConnection struct { var size uint64 var size_set = false -func (p TestPlugin) Load() { +func (p *TestPlugin) Load() { nbdkit.Debug("golang code running in the .load callback") } -func (p TestPlugin) Unload() { +func (p *TestPlugin) Unload() { nbdkit.Debug("golang code running in the .unload callback") } -func (p TestPlugin) Config(key string, v...
2020 Apr 15
2
Re: [PATCH nbdkit UNFINISHED] Add the ability to write plugins in golang.
...uint32) []byte { return []byte{} } ... no-op impls of all other methods for NBDKitPlugin interface... This code above would all be a standalone go module that is just imported. Now an impl of a plugin becomes just one single file import ( libguestfs.org/nbdkitplugin ) type TestPlugin struct { nbdkitplugin.PluginBase // This provides no-op impls of all methods ...blah... } func NewTestPlugin() NBDKitPlugin { return &TestPlugin{ ....blah... } } // This declares which methods we're actually implementing func (plugin *TestPlugi...
2006 Mar 22
0
0.3.12 Pre-Release Gems Available
...uest filters, response filters, and lots of other goodies. * You can use the DSL (Domain Specific Language) to create any number of port listeners with any number of URIs that have chained handlers on them. Here''s an example DSL loading script: require ''mongrel'' class TestPlugin < GemPlugin::Plugin "/handlers" include Mongrel::HttpHandlerPlugin def process(request, response) STDERR.puts "My options are: #{options.inspect}" STDERR.puts "Request Was:" STDERR.puts request.params.to_yaml end end config = Mongrel::Configurato...
2020 Apr 21
0
Re: [PATCH nbdkit v2] Add the ability to write plugins in golang.
...rr := conn.GetSize() if err != nil { set_error(err) return -1 } return C.int64_t(size) } > diff --git a/plugins/golang/test/test.go b/plugins/golang/test/test.go > new file mode 100644 > index 00000000..f5b1a33b > --- /dev/null > +++ b/plugins/golang/test/test.go type TestPlugin struct { nbdkit.Plugin } type TestPluginConnection struct { nbdkit.PluginConnection ...other per-connection fields... } var pluginName = "test" var size uint64 var size_set = false func (p TestPlugin) Config(key string, value string) error { if key == "size&qu...
2020 Apr 21
2
[PATCH nbdkit v2] Add the ability to write plugins in golang.
...!= 0. In other languages we would allow plugins to return an arbitrary object here, but this is not possible in golang because of lack of GC roots. - Default can_* methods are hard to implement. Ideally we would be able to test if a user plugin implements a particular callback (eg. TestPlugin.PWrite) or else defaults to the default callback, but even with reflection I don't think this is possible in golang. - Write wrappers etc for all the other methods. - Write documentation. --- plugins/golang/nbdkit-golang-plugin.pod | 34 +++ configure.ac...
2020 Apr 23
2
Re: [PATCH nbdkit v2] Add the ability to write plugins in golang.
...o write plugins in golang. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks: Dan Berrangé XXX UNFINISHED: - Default can_* methods are hard to implement. Ideally we would be able to test if a user plugin implements a particular callback (eg. TestPlugin.PWrite) or else defaults to the default callback, but even with reflection I don't think this is possible in golang. [Discussed on IRC: We decided the only option was to go for nbdkit-sh-plugin style can_* methods] - Write wrappers etc for all the other methods. - Write documentat...
2020 Apr 10
3
[PATCH nbdkit UNFINISHED] Add the ability to write plugins in golang.
Sorry Dan, but I really do dislike golang with a passion :-) Here is a patch that allows you to write nbdkit plugins in golang. As with C, OCaml and Rust, you can write a plugin in Go which compiles directly to a .so file that can be loaded into golang, so in that sense it works completely differently from scripting language plugins like Perl and Python where there's an
2020 Apr 23
0
Re: [PATCH nbdkit v2] Add the ability to write plugins in golang.
...Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > Thanks: Dan Berrangé > > XXX UNFINISHED: > > - Default can_* methods are hard to implement. Ideally we would be > able to test if a user plugin implements a particular callback > (eg. TestPlugin.PWrite) or else defaults to the default callback, > but even with reflection I don't think this is possible in golang. > [Discussed on IRC: We decided the only option was to go for > nbdkit-sh-plugin style can_* methods] > > - Write wrappers etc for all the other meth...
2019 Apr 30
6
Disk space and RAM requirements in docs
...ir 6.1M build/tools/llvm-diff/CMakeFiles 6.1M build/tools/llvm-diff 6.1M build/lib/Target/MSP430/MCTargetDesc/CMakeFiles/LLVMMSP430Desc.dir 6.1M build/lib/Target/MSP430/MCTargetDesc/CMakeFiles 6.1M build/lib/Target/MSP430/MCTargetDesc 6.0M build/utils/unittest 6.0M build/unittests/Passes/CMakeFiles/TestPlugin.dir 6.0M build/unittests/Passes/CMakeFiles 6.0M build/tools/llvm-profdata/CMakeFiles/llvm-profdata.dir 6.0M build/tools/llvm-profdata/CMakeFiles 6.0M build/tools/llvm-profdata 6.0M build/tools/clang/tools/clang-fuzzer/handle-llvm/CMakeFiles/clangHandleLLVM.dir 6.0M build/tools/clang/tools/clang-fuz...