-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1533 from iotaledger/develop
Merge v0.7.3 changes to master
- Loading branch information
Showing
103 changed files
with
2,838 additions
and
3,141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package client | ||
|
||
import ( | ||
"net/http" | ||
) | ||
|
||
const ( | ||
routeHealth = "healthz" | ||
) | ||
|
||
// HealthCheck checks whether the node is running and healthy. | ||
func (api *GoShimmerAPI) HealthCheck() error { | ||
return api.do(http.MethodGet, routeHealth, nil, nil) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package database | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/iotaledger/hive.go/objectstorage" | ||
) | ||
|
||
// CacheTimeProvider should be always used to get the CacheTime option for storage | ||
// It wraps around objectstorage.CacheTime() function and may override the input duration | ||
type CacheTimeProvider struct { | ||
forceCacheTime time.Duration | ||
} | ||
|
||
// NewCacheTimeProvider creates an instance that forces cache time to always be a certain value. | ||
// If the given value is negative, hard coded defaults will be used | ||
func NewCacheTimeProvider(forceCacheTime time.Duration) *CacheTimeProvider { | ||
return &CacheTimeProvider{forceCacheTime: forceCacheTime} | ||
} | ||
|
||
// CacheTime returns a CacheTime option. Duration may be overridden if CacheTimeProvider parameter is a non-negative integer | ||
func (m *CacheTimeProvider) CacheTime(duration time.Duration) objectstorage.Option { | ||
if m.forceCacheTime >= 0 { | ||
duration = m.forceCacheTime | ||
} | ||
return objectstorage.CacheTime(duration) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.