Skip to content

Commit 01dcb43

Browse files
authored
session: move session/internal/session to internal/session (#700)
1 parent cbb9b45 commit 01dcb43

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

session/internal/session/summary.go renamed to internal/session/summary/summary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
//
88
//
99

10-
// Package session provides internal session functionality.
11-
package session
10+
// Package summary provides internal session summary functionality.
11+
package summary
1212

1313
import (
1414
"context"

session/internal/session/summary_test.go renamed to internal/session/summary/summary_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
//
99

10-
package session
10+
package summary
1111

1212
import (
1313
"context"

session/inmemory/summary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515
"fmt"
1616
"time"
1717

18+
"trpc.group/trpc-go/trpc-agent-go/internal/session/summary"
1819
"trpc.group/trpc-go/trpc-agent-go/log"
1920
"trpc.group/trpc-go/trpc-agent-go/session"
20-
isession "trpc.group/trpc-go/trpc-agent-go/session/internal/session"
2121
)
2222

2323
// CreateSessionSummary generates a summary for the session and stores it on the session object.
@@ -37,7 +37,7 @@ func (s *SessionService) CreateSessionSummary(ctx context.Context, sess *session
3737

3838
// Run summarization based on the provided session. Persistence path will
3939
// validate app/session existence under lock.
40-
updated, err := isession.SummarizeSession(ctx, s.opts.summarizer, sess, filterKey, force)
40+
updated, err := summary.SummarizeSession(ctx, s.opts.summarizer, sess, filterKey, force)
4141
if err != nil {
4242
return fmt.Errorf("summarize and persist failed: %w", err)
4343
}

session/mysql/summary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import (
1717
"fmt"
1818
"time"
1919

20+
"trpc.group/trpc-go/trpc-agent-go/internal/session/summary"
2021
"trpc.group/trpc-go/trpc-agent-go/log"
2122
"trpc.group/trpc-go/trpc-agent-go/session"
22-
isession "trpc.group/trpc-go/trpc-agent-go/session/internal/session"
2323
)
2424

2525
// CreateSessionSummary is the internal implementation that returns the summary.
@@ -41,7 +41,7 @@ func (s *Service) CreateSessionSummary(
4141
return fmt.Errorf("check session key failed: %w", err)
4242
}
4343

44-
updated, err := isession.SummarizeSession(ctx, s.opts.summarizer, sess, filterKey, force)
44+
updated, err := summary.SummarizeSession(ctx, s.opts.summarizer, sess, filterKey, force)
4545
if err != nil {
4646
return fmt.Errorf("summarize and persist failed: %w", err)
4747
}

session/postgres/summary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import (
1717
"fmt"
1818
"time"
1919

20+
"trpc.group/trpc-go/trpc-agent-go/internal/session/summary"
2021
"trpc.group/trpc-go/trpc-agent-go/log"
2122
"trpc.group/trpc-go/trpc-agent-go/session"
22-
isession "trpc.group/trpc-go/trpc-agent-go/session/internal/session"
2323
)
2424

2525
// CreateSessionSummary is the internal implementation that returns the summary.
@@ -41,7 +41,7 @@ func (s *Service) CreateSessionSummary(
4141
return fmt.Errorf("check session key failed: %w", err)
4242
}
4343

44-
updated, err := isession.SummarizeSession(ctx, s.opts.summarizer, sess, filterKey, force)
44+
updated, err := summary.SummarizeSession(ctx, s.opts.summarizer, sess, filterKey, force)
4545
if err != nil {
4646
return fmt.Errorf("summarize and persist failed: %w", err)
4747
}

session/redis/summary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import (
1616
"fmt"
1717

1818
"github.com/redis/go-redis/v9"
19+
"trpc.group/trpc-go/trpc-agent-go/internal/session/summary"
1920
"trpc.group/trpc-go/trpc-agent-go/log"
2021
"trpc.group/trpc-go/trpc-agent-go/session"
21-
isession "trpc.group/trpc-go/trpc-agent-go/session/internal/session"
2222
)
2323

2424
// luaSummariesSetIfNewer atomically merges one filterKey summary into the stored
@@ -66,7 +66,7 @@ func (s *Service) CreateSessionSummary(ctx context.Context, sess *session.Sessio
6666
return fmt.Errorf("check session key failed: %w", err)
6767
}
6868

69-
updated, err := isession.SummarizeSession(ctx, s.opts.summarizer, sess, filterKey, force)
69+
updated, err := summary.SummarizeSession(ctx, s.opts.summarizer, sess, filterKey, force)
7070
if err != nil {
7171
return fmt.Errorf("summarize and persist failed: %w", err)
7272
}

0 commit comments

Comments
 (0)