@@ -11,7 +11,7 @@ import (
1111
1212const maxLogSize = 100 * 1024 // 100KB total log size
1313
14- var _ Store = & MemoryStore {}
14+ var _ Store = & memoryStore {}
1515
1616// Store provides methods for storing and retrieving infrastructure state
1717type Store interface {
@@ -25,23 +25,23 @@ type Store interface {
2525 GetLogs () (string , error )
2626}
2727
28- // MemoryStore is an in-memory implementation of Store
29- type MemoryStore struct {
28+ // memoryStore is an in-memory implementation of Store
29+ type memoryStore struct {
3030 infra types.Infra
3131 mu sync.RWMutex
3232}
3333
34- type StoreOption func (* MemoryStore )
34+ type StoreOption func (* memoryStore )
3535
3636func WithInfra (infra types.Infra ) StoreOption {
37- return func (s * MemoryStore ) {
37+ return func (s * memoryStore ) {
3838 s .infra = infra
3939 }
4040}
4141
4242// NewMemoryStore creates a new memory store
4343func NewMemoryStore (opts ... StoreOption ) Store {
44- s := & MemoryStore {}
44+ s := & memoryStore {}
4545
4646 for _ , opt := range opts {
4747 opt (s )
@@ -50,7 +50,7 @@ func NewMemoryStore(opts ...StoreOption) Store {
5050 return s
5151}
5252
53- func (s * MemoryStore ) Get () (types.Infra , error ) {
53+ func (s * memoryStore ) Get () (types.Infra , error ) {
5454 s .mu .RLock ()
5555 defer s .mu .RUnlock ()
5656
@@ -62,7 +62,7 @@ func (s *MemoryStore) Get() (types.Infra, error) {
6262 return infra , nil
6363}
6464
65- func (s * MemoryStore ) GetStatus () (types.Status , error ) {
65+ func (s * memoryStore ) GetStatus () (types.Status , error ) {
6666 s .mu .RLock ()
6767 defer s .mu .RUnlock ()
6868
@@ -74,14 +74,14 @@ func (s *MemoryStore) GetStatus() (types.Status, error) {
7474 return status , nil
7575}
7676
77- func (s * MemoryStore ) SetStatus (status types.Status ) error {
77+ func (s * memoryStore ) SetStatus (status types.Status ) error {
7878 s .mu .Lock ()
7979 defer s .mu .Unlock ()
8080 s .infra .Status = status
8181 return nil
8282}
8383
84- func (s * MemoryStore ) SetStatusDesc (desc string ) error {
84+ func (s * memoryStore ) SetStatusDesc (desc string ) error {
8585 s .mu .Lock ()
8686 defer s .mu .Unlock ()
8787
@@ -93,7 +93,7 @@ func (s *MemoryStore) SetStatusDesc(desc string) error {
9393 return nil
9494}
9595
96- func (s * MemoryStore ) RegisterComponent (name string ) error {
96+ func (s * memoryStore ) RegisterComponent (name string ) error {
9797 s .mu .Lock ()
9898 defer s .mu .Unlock ()
9999
@@ -109,7 +109,7 @@ func (s *MemoryStore) RegisterComponent(name string) error {
109109 return nil
110110}
111111
112- func (s * MemoryStore ) SetComponentStatus (name string , status types.Status ) error {
112+ func (s * memoryStore ) SetComponentStatus (name string , status types.Status ) error {
113113 s .mu .Lock ()
114114 defer s .mu .Unlock ()
115115
@@ -123,7 +123,7 @@ func (s *MemoryStore) SetComponentStatus(name string, status types.Status) error
123123 return fmt .Errorf ("component %s not found" , name )
124124}
125125
126- func (s * MemoryStore ) AddLogs (logs string ) error {
126+ func (s * memoryStore ) AddLogs (logs string ) error {
127127 s .mu .Lock ()
128128 defer s .mu .Unlock ()
129129
@@ -135,7 +135,7 @@ func (s *MemoryStore) AddLogs(logs string) error {
135135 return nil
136136}
137137
138- func (s * MemoryStore ) GetLogs () (string , error ) {
138+ func (s * memoryStore ) GetLogs () (string , error ) {
139139 s .mu .RLock ()
140140 defer s .mu .RUnlock ()
141141 return s .infra .Logs , nil
0 commit comments