summaryrefslogtreecommitdiffhomepage
path: root/tsconsensus/bolt_store.go
blob: ca347cfc049b24d66e7f97171fcc160977755374 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

//go:build !loong64

package tsconsensus

import (
	"github.com/hashicorp/raft"
	raftboltdb "github.com/hashicorp/raft-boltdb/v2"
)

func boltStore(path string) (raft.StableStore, raft.LogStore, error) {
	store, err := raftboltdb.NewBoltStore(path)
	if err != nil {
		return nil, nil, err
	}
	return store, store, nil
}