Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
A
Aragami
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
Aragami
Commits
b8ccffd3
Commit
b8ccffd3
authored
Jan 04, 2026
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow use existing driver
parent
23a06052
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
index.ts
index.ts
+1
-0
src/aragami.ts
src/aragami.ts
+4
-5
src/def.ts
src/def.ts
+2
-0
src/drivers/index.ts
src/drivers/index.ts
+2
-0
No files found.
index.ts
View file @
b8ccffd3
...
@@ -2,3 +2,4 @@ export * from './src/aragami';
...
@@ -2,3 +2,4 @@ export * from './src/aragami';
export
*
from
'
./src/def
'
;
export
*
from
'
./src/def
'
;
export
*
from
'
./src/decorators
'
;
export
*
from
'
./src/decorators
'
;
export
*
from
'
./src/wrappers
'
;
export
*
from
'
./src/wrappers
'
;
export
*
from
'
./src/drivers
'
;
src/aragami.ts
View file @
b8ccffd3
import
{
BaseDriver
}
from
'
./base-driver
'
;
import
{
BaseDriver
}
from
'
./base-driver
'
;
import
{
AnyClass
,
AragamiOptions
,
Awaitable
,
ClassType
}
from
'
./def
'
;
import
{
AnyClass
,
AragamiOptions
,
Awaitable
,
ClassType
}
from
'
./def
'
;
import
{
RedisDriver
}
from
'
./drivers/redis
'
;
import
{
MemoryDriver
}
from
'
./drivers/memory
'
;
import
{
reflector
}
from
'
./metadata
'
;
import
{
reflector
}
from
'
./metadata
'
;
import
{
encode
,
decode
}
from
'
encoded-buffer
'
;
import
{
encode
,
decode
}
from
'
encoded-buffer
'
;
import
{
makeArray
,
MayBeArray
}
from
'
./utility/utility
'
;
import
{
makeArray
,
MayBeArray
}
from
'
./utility/utility
'
;
import
{
PartialDeep
}
from
'
./utility/partial-deep
'
;
import
{
PartialDeep
}
from
'
./utility/partial-deep
'
;
import
{
wrapClass
}
from
'
./utility/encode-decode
'
;
import
{
wrapClass
}
from
'
./utility/encode-decode
'
;
import
{
MemoryDriver
,
RedisDriver
}
from
'
./drivers
'
;
export
class
Aragami
{
export
class
Aragami
{
readonly
driver
:
BaseDriver
;
readonly
driver
:
BaseDriver
;
constructor
(
private
options
:
AragamiOptions
=
{})
{
constructor
(
private
options
:
AragamiOptions
=
{})
{
this
.
driver
=
options
.
redis
this
.
driver
=
?
new
RedisDriver
(
options
.
redis
)
options
.
useDriver
||
:
new
MemoryDriver
(
);
(
options
.
redis
?
new
RedisDriver
(
options
.
redis
)
:
new
MemoryDriver
()
);
}
}
private
getBaseKey
(
o
:
string
|
any
):
string
{
private
getBaseKey
(
o
:
string
|
any
):
string
{
...
...
src/def.ts
View file @
b8ccffd3
import
{
RedisOptions
}
from
'
ioredis
'
;
import
{
RedisOptions
}
from
'
ioredis
'
;
import
{
Settings
}
from
'
@sesamecare-oss/redlock
'
;
import
{
Settings
}
from
'
@sesamecare-oss/redlock
'
;
import
{
BaseDriver
}
from
'
./base-driver
'
;
export
type
RedisDriverOptions
=
RedisOptions
&
{
export
type
RedisDriverOptions
=
RedisOptions
&
{
uri
?:
string
;
uri
?:
string
;
...
@@ -13,6 +14,7 @@ export type RedisDriverOptions = RedisOptions & {
...
@@ -13,6 +14,7 @@ export type RedisDriverOptions = RedisOptions & {
};
};
export
interface
AragamiOptions
{
export
interface
AragamiOptions
{
useDriver
?:
BaseDriver
;
redis
?:
RedisDriverOptions
;
redis
?:
RedisDriverOptions
;
defaultTTL
?:
number
;
defaultTTL
?:
number
;
}
}
...
...
src/drivers/index.ts
0 → 100644
View file @
b8ccffd3
export
*
from
'
./memory
'
;
export
*
from
'
./redis
'
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment