Skip to content

Commit

Permalink
adding snipsync to nexus go samples (#365)
Browse files Browse the repository at this point in the history
* adding snipsync

* update snipstart titles
  • Loading branch information
jsundai authored Oct 2, 2024
1 parent a3a02e4 commit 2e787da
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nexus/caller/starter/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @@@SNIPSTART samples-go-nexus-caller-starter
package main

import (
Expand Down Expand Up @@ -48,3 +49,4 @@ func runWorkflow(c client.Client, workflow interface{}, args ...interface{}) {
}
log.Println("Workflow result:", result)
}
// @@@SNIPEND
2 changes: 2 additions & 0 deletions nexus/caller/worker/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @@@SNIPSTART samples-go-nexus-caller-worker
package main

import (
Expand Down Expand Up @@ -33,3 +34,4 @@ func main() {
log.Fatalln("Unable to start worker", err)
}
}
// @@@SNIPEND
2 changes: 2 additions & 0 deletions nexus/caller/workflows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @@@SNIPSTART samples-go-nexus-caller-workflow
package caller

import (
Expand Down Expand Up @@ -41,3 +42,4 @@ func HelloCallerWorkflow(ctx workflow.Context, name string, language service.Lan

return res.Message, nil
}
// @@@SNIPEND
2 changes: 2 additions & 0 deletions nexus/handler/app.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @@@SNIPSTART samples-go-nexus-handler
package handler

import (
Expand Down Expand Up @@ -48,3 +49,4 @@ func HelloHandlerWorkflow(_ workflow.Context, input service.HelloInput) (service
}
return service.HelloOutput{}, fmt.Errorf("unsupported language %q", input.Language)
}
// @@@SNIPEND
2 changes: 2 additions & 0 deletions nexus/handler/worker/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @@@SNIPSTART samples-go-nexus-handler-worker
package main

import (
Expand Down Expand Up @@ -43,3 +44,4 @@ func main() {
log.Fatalln("Unable to start worker", err)
}
}
// @@@SNIPEND
2 changes: 2 additions & 0 deletions nexus/options/cli.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @@@SNIPSTART samples-go-nexus-cli
package options

import (
Expand Down Expand Up @@ -71,3 +72,4 @@ func ParseClientOptionFlags(args []string) (client.Options, error) {
ConnectionOptions: connectionOptions,
}, nil
}
// @@@SNIPEND
2 changes: 2 additions & 0 deletions nexus/service/api.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @@@SNIPSTART samples-go-nexus-service
package service

const HelloServiceName = "my-hello-service"
Expand Down Expand Up @@ -32,3 +33,4 @@ type HelloInput struct {
type HelloOutput struct {
Message string
}
// @@@SNIPEND

0 comments on commit 2e787da

Please sign in to comment.