Compare commits

...
17 Commits
Author SHA1 Message Date
beejay c6eb36d63e Merge pull request 'add MQTT topic helper functions for operation and deployment' (#4) from feat/mqtt_helpers into main
Reviewed-on: #4
2026-11-19 15:05:22 +09:00
beejay c99fe43dfc add MQTT topic helper functions for operation and deployment 2026-11-19 15:04:44 +09:00
beejay 7649a4795f Merge pull request 'add client_id field to Deployment and Message messages in Protobufs' (#3) from proto/clientid into main
Reviewed-on: #3
2026-11-17 15:09:34 +09:00
actions[bot] c9a11b135b Update generated Protobufs 2026-11-17 06:00:00 +00:00
beejay f3aa93406c add client_id field to Deployment and Message messages in Protobufs
Build protos / Build Protobufs (pull_request) Successful in 3m11s
2026-11-17 14:55:39 +09:00
beejay 489b6463fc Merge pull request 'refactor Deployment message structure in deployment.proto' (#2) from feat/refactor into main
Reviewed-on: #2
2026-11-13 16:19:14 +09:00
actions[bot] 3769aa87a6 Update generated Protobufs 2026-11-13 06:20:19 +00:00
beejay ccac19a1b0 refactor Deployment message structure in deployment.proto
Build protos / Build Protobufs (pull_request) Successful in 27s
2026-11-13 15:19:39 +09:00
beejay e21d7f2394 Merge pull request 'add README documentation for Fog Model and Protocol Buffer schemas' (#1) from docs/readme into main
Reviewed-on: #1
2026-11-11 17:18:23 +09:00
actions[bot] 2caed6fd6f Update generated Protobufs 2026-11-11 08:15:05 +00:00
beejay 8d493c6579 update CI workflow to install specific protoc version and enhance generated Protobufs handling
Build protos / Build Protobufs (pull_request) Successful in 20s
2026-11-11 17:14:43 +09:00
beejay ce2c54acf2 update CI workflow to install specific protoc version and enhance generated Protobufs handling 2026-11-11 17:11:48 +09:00
beejay 35d0739b63 add CLEANUP action to DeploymentAction enum in deployment.proto
Build protos / Build Protobufs (pull_request) Successful in 37s
2026-11-11 17:05:37 +09:00
beejay d6c399fded update build configuration to trigger on changes to Protobuf files 2026-11-11 17:04:45 +09:00
beejay c3339ab49a update CI configuration to commit and push generated Protobufs 2026-11-11 17:03:26 +09:00
beejay 85a6397d1d automate protobuf generation and update git configuration for CI
Build protos / Build Protobufs (pull_request) Failing after 38s
2026-11-11 16:29:50 +09:00
beejay 47e0e79550 add README documentation for Fog Model and Protocol Buffer schemas
Build protos / Build Protobufs (pull_request) Successful in 5m42s
2026-11-11 16:21:55 +09:00
7 changed files with 187 additions and 198 deletions

No files matched your search

+34 -13
View File
@@ -1,16 +1,12 @@
name: Build protos name: Build protos
on: on:
pull_request: pull_request:
branches: paths:
- main - '*.proto'
types: - '**/*.proto'
- opened
- synchronize permissions:
- reopened contents: write
- edited
push:
tags:
- 'v*.*.*'
jobs: jobs:
build: build:
@@ -21,6 +17,7 @@ jobs:
uses: actions/checkout@v7 uses: actions/checkout@v7
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.sha || github.sha }}
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v7 uses: actions/setup-go@v7
@@ -29,13 +26,37 @@ jobs:
- name: Install protoc - name: Install protoc
run: | run: |
sudo apt-get update curl --fail --location --silent --show-error \
sudo apt-get install -y protobuf-compiler --output "$RUNNER_TEMP/protoc.zip" \
https://github.com/protocolbuffers/protobuf/releases/download/v36.2/protoc-36.2-linux-x86_64.zip
unzip -q "$RUNNER_TEMP/protoc.zip" -d "$RUNNER_TEMP/protoc"
echo "$RUNNER_TEMP/protoc/bin" >> "$GITHUB_PATH"
- name: Install protoc-gen-go - name: Install protoc-gen-go
run: | run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.12
- name: Generate Protobufs - name: Generate Protobufs
run: | run: |
make proto make proto
- name: Commit and push changes
env:
HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
HEAD_REF: ${{ github.event.pull_request.head.ref }}
REPOSITORY: ${{ github.repository }}
run: |
git add -- '*.pb.go'
if git diff --cached --quiet; then
exit 0
fi
if [ "$HEAD_REPOSITORY" != "$REPOSITORY" ]; then
echo "::error::Generated protobufs are out of date. Run make proto and commit the changes."
exit 1
fi
git config user.name "actions[bot]"
git config user.email "noreply@beejay.kim"
git commit -m "Update generated Protobufs"
git push origin "HEAD:refs/heads/$HEAD_REF"
+71
View File
@@ -0,0 +1,71 @@
# Fog Model
This module contains the Protocol Buffer schemas and generated Go types used to
represent Fog deployment data and control messages.
## Schemas
- `deployment.proto` defines `DeploymentAction` (`STOP` or `START`),
`GlobalEnvironment`, `ConfigFile`, and `Deployment`.
- `c2o/operation.proto` defines request `Message` values and `RequestType`
(`PING` or `DEPLOYMENT`).
The generated Go packages are `beejay.kim/fog/model` and
`beejay.kim/fog/model/c2o`, respectively. The generated `.pb.go` files are
checked in; edit the `.proto` files rather than editing generated code.
## Using the Go types
Import the generated package and use the standard Protocol Buffers Go API:
```go
package main
import (
"fmt"
model "beejay.kim/fog/model"
"google.golang.org/protobuf/proto"
)
func main() {
deployment := &model.Deployment{
Id: "example",
Action: model.DeploymentAction_START,
Env: &model.GlobalEnvironment{
Version: "1",
Variables: map[string]string{"REGION": "west"},
},
}
data, err := proto.Marshal(deployment)
if err != nil {
panic(err)
}
var decoded model.Deployment
if err := proto.Unmarshal(data, &decoded); err != nil {
panic(err)
}
fmt.Println(decoded.GetId())
}
```
The module requires Go 1.27 and `google.golang.org/protobuf`.
## Regenerating Go code
Install `protoc` 36.2 using the [official installation
instructions](https://protobuf.dev/installation/), and ensure it and the Go
generator are on `PATH`:
```sh
protoc --version
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.12
make proto
```
`make proto` regenerates the Go files from both schemas. Commit the updated
`.pb.go` files together with any schema changes. The workflow pushes generated
files to same-repository pull request branches; for pull requests from forks,
it reports an error if generated files are out of date.
+11 -2
View File
@@ -71,6 +71,7 @@ type Message struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
Type RequestType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.RequestType" json:"type,omitempty"` Type RequestType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.RequestType" json:"type,omitempty"`
ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@@ -119,15 +120,23 @@ func (x *Message) GetType() RequestType {
return RequestType_PING return RequestType_PING
} }
func (x *Message) GetClientId() string {
if x != nil {
return x.ClientId
}
return ""
}
var File_operation_proto protoreflect.FileDescriptor var File_operation_proto protoreflect.FileDescriptor
const file_operation_proto_rawDesc = "" + const file_operation_proto_rawDesc = "" +
"\n" + "\n" +
"\x0foperation.proto\x12\x05proto\"P\n" + "\x0foperation.proto\x12\x05proto\"m\n" +
"\aMessage\x12\x1d\n" + "\aMessage\x12\x1d\n" +
"\n" + "\n" +
"request_id\x18\x01 \x01(\tR\trequestId\x12&\n" + "request_id\x18\x01 \x01(\tR\trequestId\x12&\n" +
"\x04type\x18\x02 \x01(\x0e2\x12.proto.RequestTypeR\x04type*'\n" + "\x04type\x18\x02 \x01(\x0e2\x12.proto.RequestTypeR\x04type\x12\x1b\n" +
"\tclient_id\x18\x03 \x01(\tR\bclientId*'\n" +
"\vRequestType\x12\b\n" + "\vRequestType\x12\b\n" +
"\x04PING\x10\x00\x12\x0e\n" + "\x04PING\x10\x00\x12\x0e\n" +
"\n" + "\n" +
+1
View File
@@ -11,4 +11,5 @@ enum RequestType {
message Message { message Message {
string request_id = 1; string request_id = 1;
RequestType type = 2; RequestType type = 2;
string client_id = 3;
} }
+33 -168
View File
@@ -24,8 +24,9 @@ const (
type DeploymentAction int32 type DeploymentAction int32
const ( const (
DeploymentAction_STOP DeploymentAction = 0 DeploymentAction_STOP DeploymentAction = 0
DeploymentAction_START DeploymentAction = 1 DeploymentAction_START DeploymentAction = 1
DeploymentAction_CLEANUP DeploymentAction = 2
) )
// Enum value maps for DeploymentAction. // Enum value maps for DeploymentAction.
@@ -33,10 +34,12 @@ var (
DeploymentAction_name = map[int32]string{ DeploymentAction_name = map[int32]string{
0: "STOP", 0: "STOP",
1: "START", 1: "START",
2: "CLEANUP",
} }
DeploymentAction_value = map[string]int32{ DeploymentAction_value = map[string]int32{
"STOP": 0, "STOP": 0,
"START": 1, "START": 1,
"CLEANUP": 2,
} }
) )
@@ -67,132 +70,19 @@ func (DeploymentAction) EnumDescriptor() ([]byte, []int) {
return file_deployment_proto_rawDescGZIP(), []int{0} return file_deployment_proto_rawDescGZIP(), []int{0}
} }
type GlobalEnvironment struct {
state protoimpl.MessageState `protogen:"open.v1"`
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
Variables map[string]string `protobuf:"bytes,2,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GlobalEnvironment) Reset() {
*x = GlobalEnvironment{}
mi := &file_deployment_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GlobalEnvironment) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GlobalEnvironment) ProtoMessage() {}
func (x *GlobalEnvironment) ProtoReflect() protoreflect.Message {
mi := &file_deployment_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GlobalEnvironment.ProtoReflect.Descriptor instead.
func (*GlobalEnvironment) Descriptor() ([]byte, []int) {
return file_deployment_proto_rawDescGZIP(), []int{0}
}
func (x *GlobalEnvironment) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *GlobalEnvironment) GetVariables() map[string]string {
if x != nil {
return x.Variables
}
return nil
}
type ConfigFile struct {
state protoimpl.MessageState `protogen:"open.v1"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ConfigFile) Reset() {
*x = ConfigFile{}
mi := &file_deployment_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ConfigFile) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConfigFile) ProtoMessage() {}
func (x *ConfigFile) ProtoReflect() protoreflect.Message {
mi := &file_deployment_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ConfigFile.ProtoReflect.Descriptor instead.
func (*ConfigFile) Descriptor() ([]byte, []int) {
return file_deployment_proto_rawDescGZIP(), []int{1}
}
func (x *ConfigFile) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *ConfigFile) GetContent() []byte {
if x != nil {
return x.Content
}
return nil
}
func (x *ConfigFile) GetMode() uint32 {
if x != nil {
return x.Mode
}
return 0
}
type Deployment struct { type Deployment struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Env *GlobalEnvironment `protobuf:"bytes,2,opt,name=env,proto3" json:"env,omitempty"` Action DeploymentAction `protobuf:"varint,2,opt,name=action,proto3,enum=proto.DeploymentAction" json:"action,omitempty"`
Action DeploymentAction `protobuf:"varint,3,opt,name=action,proto3,enum=proto.DeploymentAction" json:"action,omitempty"` Hcl []byte `protobuf:"bytes,3,opt,name=hcl,proto3" json:"hcl,omitempty"`
Hcl []byte `protobuf:"bytes,4,opt,name=hcl,proto3" json:"hcl,omitempty"` ClientId string `protobuf:"bytes,4,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
ConfigFiles []*ConfigFile `protobuf:"bytes,10,rep,name=config_files,json=configFiles,proto3" json:"config_files,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *Deployment) Reset() { func (x *Deployment) Reset() {
*x = Deployment{} *x = Deployment{}
mi := &file_deployment_proto_msgTypes[2] mi := &file_deployment_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -204,7 +94,7 @@ func (x *Deployment) String() string {
func (*Deployment) ProtoMessage() {} func (*Deployment) ProtoMessage() {}
func (x *Deployment) ProtoReflect() protoreflect.Message { func (x *Deployment) ProtoReflect() protoreflect.Message {
mi := &file_deployment_proto_msgTypes[2] mi := &file_deployment_proto_msgTypes[0]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -217,7 +107,7 @@ func (x *Deployment) ProtoReflect() protoreflect.Message {
// Deprecated: Use Deployment.ProtoReflect.Descriptor instead. // Deprecated: Use Deployment.ProtoReflect.Descriptor instead.
func (*Deployment) Descriptor() ([]byte, []int) { func (*Deployment) Descriptor() ([]byte, []int) {
return file_deployment_proto_rawDescGZIP(), []int{2} return file_deployment_proto_rawDescGZIP(), []int{0}
} }
func (x *Deployment) GetId() string { func (x *Deployment) GetId() string {
@@ -227,13 +117,6 @@ func (x *Deployment) GetId() string {
return "" return ""
} }
func (x *Deployment) GetEnv() *GlobalEnvironment {
if x != nil {
return x.Env
}
return nil
}
func (x *Deployment) GetAction() DeploymentAction { func (x *Deployment) GetAction() DeploymentAction {
if x != nil { if x != nil {
return x.Action return x.Action
@@ -248,40 +131,28 @@ func (x *Deployment) GetHcl() []byte {
return nil return nil
} }
func (x *Deployment) GetConfigFiles() []*ConfigFile { func (x *Deployment) GetClientId() string {
if x != nil { if x != nil {
return x.ConfigFiles return x.ClientId
} }
return nil return ""
} }
var File_deployment_proto protoreflect.FileDescriptor var File_deployment_proto protoreflect.FileDescriptor
const file_deployment_proto_rawDesc = "" + const file_deployment_proto_rawDesc = "" +
"\n" + "\n" +
"\x10deployment.proto\x12\x05proto\"\xb2\x01\n" + "\x10deployment.proto\x12\x05proto\"|\n" +
"\x11GlobalEnvironment\x12\x18\n" +
"\aversion\x18\x01 \x01(\tR\aversion\x12E\n" +
"\tvariables\x18\x02 \x03(\v2'.proto.GlobalEnvironment.VariablesEntryR\tvariables\x1a<\n" +
"\x0eVariablesEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"N\n" +
"\n" +
"ConfigFile\x12\x12\n" +
"\x04path\x18\x01 \x01(\tR\x04path\x12\x18\n" +
"\acontent\x18\x02 \x01(\fR\acontent\x12\x12\n" +
"\x04mode\x18\x03 \x01(\rR\x04mode\"\xc1\x01\n" +
"\n" + "\n" +
"Deployment\x12\x0e\n" + "Deployment\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12*\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12/\n" +
"\x03env\x18\x02 \x01(\v2\x18.proto.GlobalEnvironmentR\x03env\x12/\n" + "\x06action\x18\x02 \x01(\x0e2\x17.proto.DeploymentActionR\x06action\x12\x10\n" +
"\x06action\x18\x03 \x01(\x0e2\x17.proto.DeploymentActionR\x06action\x12\x10\n" + "\x03hcl\x18\x03 \x01(\fR\x03hcl\x12\x1b\n" +
"\x03hcl\x18\x04 \x01(\fR\x03hcl\x124\n" + "\tclient_id\x18\x04 \x01(\tR\bclientId*4\n" +
"\fconfig_files\x18\n" +
" \x03(\v2\x11.proto.ConfigFileR\vconfigFiles*'\n" +
"\x10DeploymentAction\x12\b\n" + "\x10DeploymentAction\x12\b\n" +
"\x04STOP\x10\x00\x12\t\n" + "\x04STOP\x10\x00\x12\t\n" +
"\x05START\x10\x01B\x16Z\x14beejay.kim/fog/modelb\x06proto3" "\x05START\x10\x01\x12\v\n" +
"\aCLEANUP\x10\x02B\x16Z\x14beejay.kim/fog/modelb\x06proto3"
var ( var (
file_deployment_proto_rawDescOnce sync.Once file_deployment_proto_rawDescOnce sync.Once
@@ -296,24 +167,18 @@ func file_deployment_proto_rawDescGZIP() []byte {
} }
var file_deployment_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_deployment_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_deployment_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_deployment_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_deployment_proto_goTypes = []any{ var file_deployment_proto_goTypes = []any{
(DeploymentAction)(0), // 0: proto.DeploymentAction (DeploymentAction)(0), // 0: proto.DeploymentAction
(*GlobalEnvironment)(nil), // 1: proto.GlobalEnvironment (*Deployment)(nil), // 1: proto.Deployment
(*ConfigFile)(nil), // 2: proto.ConfigFile
(*Deployment)(nil), // 3: proto.Deployment
nil, // 4: proto.GlobalEnvironment.VariablesEntry
} }
var file_deployment_proto_depIdxs = []int32{ var file_deployment_proto_depIdxs = []int32{
4, // 0: proto.GlobalEnvironment.variables:type_name -> proto.GlobalEnvironment.VariablesEntry 0, // 0: proto.Deployment.action:type_name -> proto.DeploymentAction
1, // 1: proto.Deployment.env:type_name -> proto.GlobalEnvironment 1, // [1:1] is the sub-list for method output_type
0, // 2: proto.Deployment.action:type_name -> proto.DeploymentAction 1, // [1:1] is the sub-list for method input_type
2, // 3: proto.Deployment.config_files:type_name -> proto.ConfigFile 1, // [1:1] is the sub-list for extension type_name
4, // [4:4] is the sub-list for method output_type 1, // [1:1] is the sub-list for extension extendee
4, // [4:4] is the sub-list for method input_type 0, // [0:1] is the sub-list for field type_name
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
} }
func init() { file_deployment_proto_init() } func init() { file_deployment_proto_init() }
@@ -327,7 +192,7 @@ func file_deployment_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_deployment_proto_rawDesc), len(file_deployment_proto_rawDesc)), RawDescriptor: unsafe.Slice(unsafe.StringData(file_deployment_proto_rawDesc), len(file_deployment_proto_rawDesc)),
NumEnums: 1, NumEnums: 1,
NumMessages: 4, NumMessages: 1,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },
+4 -15
View File
@@ -6,23 +6,12 @@ option go_package = "beejay.kim/fog/model";
enum DeploymentAction { enum DeploymentAction {
STOP = 0; STOP = 0;
START = 1; START = 1;
} CLEANUP = 2;
message GlobalEnvironment {
string version = 1;
map<string, string> variables = 2;
}
message ConfigFile {
string path = 1;
bytes content = 2;
uint32 mode = 3;
} }
message Deployment { message Deployment {
string id = 1; string id = 1;
GlobalEnvironment env = 2; DeploymentAction action = 2;
DeploymentAction action = 3; bytes hcl = 3;
bytes hcl = 4; string client_id = 4;
repeated ConfigFile config_files = 10;
} }
+33
View File
@@ -0,0 +1,33 @@
package model
const (
topicOperation = "op"
topicDeployment = "deployment"
)
// QOS is the predefined Quality of Service level for MQTT messages.
//
//goland:noinspection GoUnusedConst
const QOS = 2
// OperationTopic returns the topic for operation messages for a given client ID.
//
//goland:noinspection GoUnusedExportedFunction
func OperationTopic(clientId string) string {
return makeTopic(clientId, topicOperation)
}
// DeploymentTopic returns the topic for deployment messages for a given client ID.
//
//goland:noinspection GoUnusedExportedFunction
func DeploymentTopic(clientId string) string {
return makeTopic(clientId, topicDeployment)
}
func makeTopic(clientId, topic string) string {
if clientId != "" {
clientId += "/"
}
return clientId + topic
}