이름 다시 변경

This commit is contained in:
2023-08-31 21:12:08 +09:00
parent a011588509
commit 90502c3029

View File

@ -82,7 +82,7 @@ func publickey_to_storagekey(pk publickey) storagekey {
return storagekey(hex.EncodeToString(decoded[:]))
}
type Config struct {
type SessionConfig struct {
SessionTTL int64 `json:"session_ttl"`
SessionStorage string `json:"session_storage"`
}
@ -101,7 +101,7 @@ func NewConsumer(ctx context.Context, storageAddr string, ttl time.Duration) (Co
return nil, errInvalidScheme
}
func NewConsumerWithConfig(ctx context.Context, cfg Config) (Consumer, error) {
func NewConsumerWithConfig(ctx context.Context, cfg SessionConfig) (Consumer, error) {
return NewConsumer(ctx, cfg.SessionStorage, time.Duration(cfg.SessionTTL)*time.Second)
}
@ -117,6 +117,6 @@ func NewProvider(ctx context.Context, storageAddr string, ttl time.Duration) (Pr
return nil, errInvalidScheme
}
func NewProviderWithConfig(ctx context.Context, cfg Config) (Provider, error) {
func NewProviderWithConfig(ctx context.Context, cfg SessionConfig) (Provider, error) {
return NewProvider(ctx, cfg.SessionStorage, time.Duration(cfg.SessionTTL)*time.Second)
}