• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

llamerada-jp / colonio / 18451467117

13 Oct 2025 12:12AM UTC coverage: 62.183% (-6.8%) from 68.948%
18451467117

Pull #107

github

llamerada-jp
wip

Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
Pull Request #107: implement KVS feature

297 of 923 new or added lines in 14 files covered. (32.18%)

5 existing lines in 2 files now uncovered.

3111 of 5003 relevant lines covered (62.18%)

34.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/internal/kvs/sector.go
1
/*
2
 * Copyright 2017- Yuji Ito <llamerada.jp@gmail.com>
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package kvs
17

18
import proto "github.com/llamerada-jp/colonio/api/colonio/v1alpha"
19

20
type sector struct {
21
        raft  *raftNode
22
        store *store
23
}
24

NEW
25
func (s *sector) raftNodeApplyProposal(proposal *proto.RaftProposalStore) {
×
NEW
26
        s.store.applyProposal(proposal)
×
NEW
27
}
×
28

NEW
29
func (s *sector) raftNodeGetSnapshot() ([]byte, error) {
×
NEW
30
        return s.store.exportSnapshot()
×
NEW
31
}
×
32

NEW
33
func (s *sector) raftNodeApplySnapshot(snapshot []byte) error {
×
NEW
34
        return s.store.importSnapshot(snapshot)
×
NEW
35
}
×
36

NEW
37
func (s *sector) storePropose(command *proto.RaftProposalStore) {
×
NEW
38
        s.raft.propose(&proto.RaftProposal{
×
NEW
39
                Content: &proto.RaftProposal_Store{
×
NEW
40
                        Store: command,
×
NEW
41
                },
×
NEW
42
        })
×
NEW
43
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc