Skip to content

Commit

Permalink
Enable go-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
halabooda committed Jan 1, 2025
1 parent 9b6fc30 commit c35568f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import (
"github.com/hashicorp/go-plugin"
)

type MyHookHandler struct {
type CodenireHandler struct {
}

func (g *MyHookHandler) Setup() error {
log.Println("MyHookHandler.Setup is invoked")
func (g *CodenireHandler) Setup() error {
log.Println("CodenireHandler.Setup is invoked")
return nil
}

func (g *MyHookHandler) InvokeHook(req hooks.HookRequest) (res hooks.HookResponse, err error) {
log.Println("MyHookHandler.InvokeHook is invoked")
func (g *CodenireHandler) InvokeHook(req hooks.HookRequest) (res hooks.HookResponse, err error) {
log.Println("CodenireHandler.InvokeHook is invoked")

res.HTTPResponse.Header = make(map[string]string)

Expand All @@ -36,7 +36,7 @@ var handshakeConfig = plugin.HandshakeConfig{
}

func main() {
myHandler := &MyHookHandler{}
myHandler := &CodenireHandler{}

var pluginMap = map[string]plugin.Plugin{
"hookHandler": &codeniredplugin.HookHandlerPlugin{Impl: myHandler},
Expand Down

0 comments on commit c35568f

Please sign in to comment.