Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit 4a2c971

Browse files
authored
license (#3547)
1 parent 469ba92 commit 4a2c971

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

backend/internal/cmds/mgmt/serve/connect/cmd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ func serve(ctx context.Context) error {
153153
cascadelicense := license.NewCascadeLicense(
154154
ncloudlicense,
155155
eelicense,
156+
license.NewValidLicense(),
156157
)
157158

158159
mux := http.NewServeMux()

internal/ee/license/license.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ func (e *EELicense) ExpiresAt() time.Time {
4949
return e.contents.ExpiresAt
5050
}
5151

52+
type ValidLicense struct {
53+
}
54+
55+
func (v *ValidLicense) IsValid() bool {
56+
return true
57+
}
58+
59+
func (v *ValidLicense) ExpiresAt() time.Time {
60+
return time.Now().UTC().Add(time.Hour * 24 * 365 * 10)
61+
}
62+
63+
func NewValidLicense() *ValidLicense {
64+
return &ValidLicense{}
65+
}
66+
5267
// Retrieves the EE license from the environment
5368
// If not enabled, will still return valid struct.
5469
// Errors if not able to properly parse a provided EE license from the environment

worker/internal/cmds/worker/serve/serve.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ func serve(ctx context.Context) error {
328328
cascadelicense := license.NewCascadeLicense(
329329
ncloudlicense,
330330
eelicense,
331+
license.NewValidLicense(),
331332
)
332333

333334
neosyncurl := shared.GetNeosyncUrl()

0 commit comments

Comments
 (0)