Documentation
¶
Index ¶
Constants ¶
View Source
const ( TokenSize = 32 TokenExpiration = 10 * time.Minute TokenRotateInterval = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func StartNKNServer ¶ added in v1.0.2
Types ¶
type Client ¶ added in v1.0.2
type Client struct { *nkn.MultiClient // contains filtered or unexported fields }
type GetInfoJSON ¶ added in v1.0.2
type GetInfoJSON struct { Addr string `json:"addr"` LocalIP *localIPJSON `json:"localIP"` AdminHTTPAPIDisabled bool `json:"adminHttpApiDisabled"` Version string `json:"version"` Tuna bool `json:"tuna"` TunaServiceName string `json:"tunaServiceName,omitempty"` TunaCountry []string `json:"tunaCountry,omitempty"` InPrice []string `json:"inPrice,omitempty"` OutPrice []string `json:"outPrice,omitempty"` Tags []string `json:"tags,omitempty"` }
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
func NewTokenStore ¶
func NewTokenStore(tokenExpiration, rotateInterval time.Duration) *TokenStore
func (*TokenStore) GetCurrentToken ¶
func (tr *TokenStore) GetCurrentToken() *Token
func (*TokenStore) IsValid ¶
func (tr *TokenStore) IsValid(token string) bool
func (*TokenStore) Start ¶
func (tr *TokenStore) Start()
Click to show internal directories.
Click to hide internal directories.