blob: 7d5690875b62b9c0230426b017da0ca803653594 [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.
// This file was auto-generated by the vanadium vdl tool.
// Source: types.vdl
package discovery
import (
// VDL system imports
"v.io/v23/vdl"
)
// Advertisement represents a feed into advertiser to broadcast its contents
// to scanners.
//
// A large advertisement may require additional RPC calls causing delay in
// discovery. We limit the maximum size of an advertisement to 512 bytes
// excluding id and attachments.
type Advertisement struct {
// Universal unique identifier of the advertisement.
// If this is not specified, a random unique identifier will be assigned.
Id AdId
// Interface name that the advertised service implements.
// E.g., 'v.io/v23/services/vtrace.Store'.
InterfaceName string
// Addresses (vanadium object names) that the advertised service is served on.
// E.g., '/host:port/a/b/c', '/ns.dev.v.io:8101/blah/blah'.
Addresses []string
// Attributes as a key/value pair.
// E.g., {'resolution': '1024x768'}.
//
// The key must be US-ASCII printable characters, excluding the '=' character
// and should not start with '_' character.
Attributes Attributes
// Attachments as a key/value pair.
// E.g., {'thumbnail': binary_data }.
//
// Unlike attributes, attachments are for binary data and they are not queryable.
// We limit the maximum size of a single attachment to 4K bytes.
//
// The key must be US-ASCII printable characters, excluding the '=' character
// and should not start with '_' character.
Attachments Attachments
}
func (Advertisement) __VDLReflect(struct {
Name string `vdl:"v.io/v23/discovery.Advertisement"`
}) {
}
// An AdId is a globally unique identifier of an advertisement.
type AdId [16]byte
func (AdId) __VDLReflect(struct {
Name string `vdl:"v.io/v23/discovery.AdId"`
}) {
}
// Attributes represents service attributes as a key/value pair.
type Attributes map[string]string
func (Attributes) __VDLReflect(struct {
Name string `vdl:"v.io/v23/discovery.Attributes"`
}) {
}
// Attachments represents service attachments as a key/value pair.
type Attachments map[string][]byte
func (Attachments) __VDLReflect(struct {
Name string `vdl:"v.io/v23/discovery.Attachments"`
}) {
}
func init() {
vdl.Register((*Advertisement)(nil))
vdl.Register((*AdId)(nil))
vdl.Register((*Attributes)(nil))
vdl.Register((*Attachments)(nil))
}