Skip to content

Commit 952d619

Browse files
committed
getBinaryHash becomes private
1 parent b4e2327 commit 952d619

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dbos/dbos.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,10 @@ func (c *dbosContext) Cancel() {
368368
c.launched.Store(false)
369369
}
370370

371-
func GetBinaryHash() (string, error) {
371+
// getBinaryHash computes and returns the SHA-256 hash of the current executable.
372+
// This is used for application versioning to ensure workflow compatibility across deployments.
373+
// Returns the hexadecimal representation of the hash or an error if the executable cannot be read.
374+
func getBinaryHash() (string, error) {
372375
execPath, err := os.Executable()
373376
if err != nil {
374377
return "", err
@@ -389,7 +392,7 @@ func GetBinaryHash() (string, error) {
389392
}
390393

391394
func computeApplicationVersion() string {
392-
hash, err := GetBinaryHash()
395+
hash, err := getBinaryHash()
393396
if err != nil {
394397
fmt.Printf("DBOS: Failed to compute binary hash: %v\n", err)
395398
return ""

0 commit comments

Comments
 (0)