Skip to content

Commit

Permalink
Merge pull request #19 from danl5/pkg_access
Browse files Browse the repository at this point in the history
The internal implementation should be more accessible
  • Loading branch information
danl5 authored May 10, 2024
2 parents e1bafb0 + ab6187d commit 2601e19
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions cmd/tool/visualize/visualize.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"os"
"time"

"github.com/danl5/goelect/internal/config"
"github.com/danl5/goelect/internal/consensus"
"github.com/danl5/goelect/internal/model"
"github.com/danl5/goelect/pkg/config"
"github.com/danl5/goelect/pkg/consensus"
"github.com/danl5/goelect/pkg/model"
)

var (
Expand Down
10 changes: 5 additions & 5 deletions elect.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"context"
"time"

"github.com/danl5/goelect/internal/config"
"github.com/danl5/goelect/internal/consensus"
"github.com/danl5/goelect/internal/log"
"github.com/danl5/goelect/internal/model"
"github.com/danl5/goelect/internal/rpc"
"github.com/danl5/goelect/pkg/config"
"github.com/danl5/goelect/pkg/consensus"
"github.com/danl5/goelect/pkg/log"
"github.com/danl5/goelect/pkg/model"
"github.com/danl5/goelect/pkg/rpc"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/onenode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/danl5/goelect"
"github.com/danl5/goelect/internal/model"
"github.com/danl5/goelect/pkg/model"
)

var (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package common

import (
"github.com/danl5/goelect/internal/model"
"github.com/danl5/goelect/pkg/model"
)

type RpcHandler interface {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/looplab/fsm"
"golang.org/x/sync/errgroup"

"github.com/danl5/goelect/internal/config"
"github.com/danl5/goelect/internal/log"
"github.com/danl5/goelect/internal/model"
"github.com/danl5/goelect/internal/rpc"
"github.com/danl5/goelect/pkg/config"
"github.com/danl5/goelect/pkg/log"
"github.com/danl5/goelect/pkg/model"
"github.com/danl5/goelect/pkg/rpc"
)

func NewConsensus(cfg *config.Config, logger log.Logger, node model.ElectNode) (*Consensus, error) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package consensus

import (
"github.com/danl5/goelect/internal/common"
"github.com/danl5/goelect/internal/config"
"github.com/danl5/goelect/internal/log"
"github.com/danl5/goelect/internal/model"
"github.com/danl5/goelect/pkg/common"
"github.com/danl5/goelect/pkg/config"
"github.com/danl5/goelect/pkg/log"
"github.com/danl5/goelect/pkg/model"
)

func NewConsensusRpcHandler(cfg *config.Config, logger log.Logger, node model.ElectNode) (*RpcHandler, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (

"github.com/stretchr/testify/assert"

"github.com/danl5/goelect/internal/common"
"github.com/danl5/goelect/internal/log"
"github.com/danl5/goelect/internal/model"
"github.com/danl5/goelect/pkg/common"
"github.com/danl5/goelect/pkg/log"
"github.com/danl5/goelect/pkg/model"
)

func TestConsensus_HeartBeat(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/rpc/helper.go → pkg/rpc/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/silenceper/pool"

"github.com/danl5/goelect/internal/log"
"github.com/danl5/goelect/pkg/log"
)

const (
Expand Down

0 comments on commit 2601e19

Please sign in to comment.