Add attribute flag building and parsing (#1562)
This adds a few command sketches but that's not the main point of the PR and filling those out will come in a different PR. This adds a new flag type that can combine inputs to a single target slice, retaining the ability to distinguish where it came from but also keep ordering across different flag names. It also implements a function that does the heuristic parsing with fallback.
This commit is contained in:
1 parent
14cc97b645
commit
a834a14785
16 files changed
+1166
-36
No files matched your search
@@ -373,14 +373,14 @@ func (r *Repository) Endpoints(ctx context.Context, setIds []string) ([]*host.En
|
||||
|
||||
type setInfo struct {
|
||||
preferredEndpoint endpoint.Option
|
||||
plgSet *pb.HostSet
|
||||
plgSet *pb.HostSet
|
||||
}
|
||||
|
||||
type catalogInfo struct{
|
||||
publicId string
|
||||
plg plgpb.HostPluginServiceServer
|
||||
setInfos map[string]*setInfo
|
||||
plgCat *hcpb.HostCatalog
|
||||
type catalogInfo struct {
|
||||
publicId string
|
||||
plg plgpb.HostPluginServiceServer
|
||||
setInfos map[string]*setInfo
|
||||
plgCat *hcpb.HostCatalog
|
||||
persisted *plgpb.HostCatalogPersisted
|
||||
}
|
||||
|
||||
@@ -458,10 +458,10 @@ func (r *Repository) Endpoints(ctx context.Context, setIds []string) ([]*host.En
|
||||
sets = append(sets, si.plgSet)
|
||||
}
|
||||
|
||||
resp, err := ci.plg.ListHosts(ctx, &plgpb.ListHostsRequest{
|
||||
resp, err := ci.plg.ListHosts(ctx, &plgpb.ListHostsRequest{
|
||||
Catalog: ci.plgCat,
|
||||
Sets: sets,
|
||||
//Persisted: ci.persisted,
|
||||
// Persisted: ci.persisted,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
|
||||
Reference in new issue
Block a user