2021-10-26 20:08:55 +00:00
|
|
|
//go:build !consulent
|
2020-09-25 17:46:38 +00:00
|
|
|
// +build !consulent
|
|
|
|
|
2017-11-29 00:30:07 +00:00
|
|
|
package consul
|
|
|
|
|
2020-01-28 23:50:41 +00:00
|
|
|
import (
|
2020-09-25 17:46:38 +00:00
|
|
|
"github.com/hashicorp/serf/serf"
|
2021-07-22 18:58:08 +00:00
|
|
|
"google.golang.org/grpc"
|
2021-10-26 20:08:55 +00:00
|
|
|
|
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
2020-01-28 23:50:41 +00:00
|
|
|
)
|
|
|
|
|
2020-09-25 17:46:38 +00:00
|
|
|
func (s *Server) removeFailedNodeEnterprise(remove func(*serf.Serf, string) error, node, wanNode string) error {
|
|
|
|
// nothing to do for oss
|
|
|
|
return nil
|
2017-12-20 21:43:38 +00:00
|
|
|
}
|
2021-07-22 18:58:08 +00:00
|
|
|
|
|
|
|
func (s *Server) registerEnterpriseGRPCServices(deps Deps, srv *grpc.Server) {}
|
2021-10-26 20:08:55 +00:00
|
|
|
|
|
|
|
// lanPoolAllMembers only returns our own segment or partition's members, because
|
|
|
|
// OSS servers can't be in multiple segments or partitions.
|
|
|
|
func (s *Server) lanPoolAllMembers() ([]serf.Member, error) {
|
|
|
|
return s.LANMembersInAgentPartition(), nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// LANMembers returns the LAN members for one of:
|
|
|
|
//
|
|
|
|
// - the requested partition
|
|
|
|
// - the requested segment
|
|
|
|
// - all segments
|
|
|
|
//
|
|
|
|
// This is limited to segments and partitions that the node is a member of.
|
|
|
|
func (s *Server) LANMembers(filter LANMemberFilter) ([]serf.Member, error) {
|
|
|
|
if err := filter.Validate(); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if filter.Segment != "" {
|
|
|
|
return nil, structs.ErrSegmentsNotSupported
|
|
|
|
}
|
|
|
|
return s.LANMembersInAgentPartition(), nil
|
|
|
|
}
|