MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / MockPeer

Struct MockPeer

pkg/util/test/cluster.go:29–35  ·  view source on GitHub ↗

MockPeer is a mock cluster.Peer used for testing.

Source from the content-addressed store, hash-verified

27
28// MockPeer is a mock cluster.Peer used for testing.
29type MockPeer struct {
30 NameFunc func() string
31 ConnFunc func() (*grpc.ClientConn, error)
32 HasRoleFunc func(ttnpb.ClusterRole) bool
33 RolesFunc func() []ttnpb.ClusterRole
34 TagsFunc func() map[string]string
35}
36
37// Name calls NameFunc if set and panics otherwise.
38func (m MockPeer) Name() string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected