blob: 0cc9b5772336f12248813f76e2bfd9512d00821d [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package discovery
import (
// Directory is the interface for advertisement directory service.
type Directory interface {
// Lookup returns the advertisement of the given service instance.
// The returned advertisement may not include all attachments.
Lookup(id discovery.AdId) (AdInfo | error) {access.Read}
// GetAttachment returns the named attachment. Accessing non-existent attachment
// is not an error - nil data is returned if not found.
// TODO(jhahn): Consider to return an error if not found.
GetAttachment(id discovery.AdId, name string) ([]byte | error) {access.Read}