sophia 8e6dcac43e
Refactor myplugin
- add mappers for command options
- move communincator and prots into their own modules
2022-04-25 12:26:07 -05:00

23 lines
682 B
Go

package myplugin
import (
sdk "github.com/hashicorp/vagrant-plugin-sdk"
"github.com/hashicorp/vagrant/builtin/myplugin/command"
communincator "github.com/hashicorp/vagrant/builtin/myplugin/communicator"
"github.com/hashicorp/vagrant/builtin/myplugin/host"
)
//go:generate protoc -I ../../.. --go_opt=plugins=grpc --go_out=../../.. vagrant-ruby/builtin/myplugin/proto/plugin.proto
// Options are the SDK options to use for instantiation.
var CommandOptions = []sdk.Option{
sdk.WithComponents(
&Provider{},
&command.Command{},
&host.AlwaysTrueHost{},
&communincator.DummyCommunicator{},
),
sdk.WithMappers(StructToCommunincatorOptions),
sdk.WithName("myplugin"),
}