mirror of https://github.com/status-im/consul.git
structs: remove two methods that were only used once each.
These methods only called a single function. Wrappers like this end up making code harder to read because it adds extra ways of doing things. We already have many helper functions for constructing these types, we don't need additional methods.
This commit is contained in:
parent
8d1378cc1d
commit
6d72517682
|
@ -98,7 +98,7 @@ func (s *handlerConnectProxy) initialize(ctx context.Context) (ConfigSnapshot, e
|
|||
Name: structs.MeshConfigMesh,
|
||||
Datacenter: s.source.Datacenter,
|
||||
QueryOptions: structs.QueryOptions{Token: s.token},
|
||||
EnterpriseMeta: *s.proxyID.DefaultEnterpriseMetaForPartition(),
|
||||
EnterpriseMeta: *structs.DefaultEnterpriseMetaInPartition(s.proxyID.PartitionOrDefault()),
|
||||
}, meshConfigEntryID, s.ch)
|
||||
if err != nil {
|
||||
return snap, err
|
||||
|
|
|
@ -1506,7 +1506,7 @@ type HealthCheck struct {
|
|||
func (hc *HealthCheck) NodeIdentity() Identity {
|
||||
return Identity{
|
||||
ID: hc.Node,
|
||||
EnterpriseMeta: *hc.NodeEnterpriseMetaForPartition(),
|
||||
EnterpriseMeta: *NodeEnterpriseMetaInPartition(hc.PartitionOrDefault()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,14 +46,6 @@ func (m *EnterpriseMeta) WildcardEnterpriseMetaForPartition() *EnterpriseMeta {
|
|||
return &emptyEnterpriseMeta
|
||||
}
|
||||
|
||||
func (m *EnterpriseMeta) DefaultEnterpriseMetaForPartition() *EnterpriseMeta {
|
||||
return &emptyEnterpriseMeta
|
||||
}
|
||||
|
||||
func (m *EnterpriseMeta) NodeEnterpriseMetaForPartition() *EnterpriseMeta {
|
||||
return &emptyEnterpriseMeta
|
||||
}
|
||||
|
||||
func (m *EnterpriseMeta) NewEnterpriseMetaInPartition(_ string) *EnterpriseMeta {
|
||||
return &emptyEnterpriseMeta
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue