repository

package
v0.0.0-...-0921c0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package repository defines interfaces for storing and retrieving device, application and binary management related information.

Index

Constants

This section is empty.

Variables

View Source
var ApplicationDesc rpc.InterfaceDesc = descApplication

ApplicationDesc describes the Application interface.

View Source
var BinaryDesc rpc.InterfaceDesc = descBinary

BinaryDesc describes the Binary interface.

View Source
var ProfileDesc rpc.InterfaceDesc = descProfile

ProfileDesc describes the Profile interface.

Functions

This section is empty.

Types

type ApplicationClientMethods

type ApplicationClientMethods interface {
	// Object provides access control for Vanadium objects.
	//
	// Vanadium services implementing dynamic access control would typically embed
	// this interface and tag additional methods defined by the service with one of
	// Admin, Read, Write, Resolve etc. For example, the VDL definition of the
	// object would be:
	//
	//   package mypackage
	//
	//   import "v.io/v23/security/access"
	//   import "v.io/v23/services/permissions"
	//
	//   type MyObject interface {
	//     permissions.Object
	//     MyRead() (string, error) {access.Read}
	//     MyWrite(string) error    {access.Write}
	//   }
	//
	// If the set of pre-defined tags is insufficient, services may define their
	// own tag type and annotate all methods with this new type.
	//
	// Instead of embedding this Object interface, define SetPermissions and
	// GetPermissions in their own interface. Authorization policies will typically
	// respect annotations of a single type. For example, the VDL definition of an
	// object would be:
	//
	//  package mypackage
	//
	//  import "v.io/v23/security/access"
	//
	//  type MyTag string
	//
	//  const (
	//    Blue = MyTag("Blue")
	//    Red  = MyTag("Red")
	//  )
	//
	//  type MyObject interface {
	//    MyMethod() (string, error) {Blue}
	//
	//    // Allow clients to change access via the access.Object interface:
	//    SetPermissions(perms access.Permissions, version string) error         {Red}
	//    GetPermissions() (perms access.Permissions, version string, err error) {Blue}
	//  }
	permissions.ObjectClientMethods
	// Tidyable specifies that a service can be tidied.
	tidyable.TidyableClientMethods
	// Match checks if any of the given profiles contains an application
	// envelope for the given application version (specified through the
	// object name suffix) and if so, returns this envelope. If multiple
	// profile matches are possible, the method returns the first
	// matching profile, respecting the order of the input argument.
	//
	// If the version is not specified in the suffix, the envelope
	// corresponding to the latest version that matches any of the given
	// profiles is returned.  If several profiles match this version, the
	// envelope for the first matching profile is returned, respecting the
	// order of the input argument.
	Match(_ *context.T, profiles []string, _ ...rpc.CallOpt) (application.Envelope, error)
}

ApplicationClientMethods is the client interface containing Application methods.

Application provides access to application envelopes. An application envelope is identified by an application name and an application version, which are specified through the object name, and a profile name, which is specified using a method argument.

Example: /apps/search/v1.Match([]string{"base", "media"})

returns an application envelope that can be used for downloading
and executing the "search" application, version "v1", runnable
on either the "base" or "media" profile.

type ApplicationClientStub

type ApplicationClientStub interface {
	ApplicationClientMethods
	rpc.UniversalServiceMethods
}

ApplicationClientStub adds universal methods to ApplicationClientMethods.

func ApplicationClient

func ApplicationClient(name string) ApplicationClientStub

ApplicationClient returns a client stub for Application.

type ApplicationServerMethods

type ApplicationServerMethods interface {
	// Object provides access control for Vanadium objects.
	//
	// Vanadium services implementing dynamic access control would typically embed
	// this interface and tag additional methods defined by the service with one of
	// Admin, Read, Write, Resolve etc. For example, the VDL definition of the
	// object would be:
	//
	//   package mypackage
	//
	//   import "v.io/v23/security/access"
	//   import "v.io/v23/services/permissions"
	//
	//   type MyObject interface {
	//     permissions.Object
	//     MyRead() (string, error) {access.Read}
	//     MyWrite(string) error    {access.Write}
	//   }
	//
	// If the set of pre-defined tags is insufficient, services may define their
	// own tag type and annotate all methods with this new type.
	//
	// Instead of embedding this Object interface, define SetPermissions and
	// GetPermissions in their own interface. Authorization policies will typically
	// respect annotations of a single type. For example, the VDL definition of an
	// object would be:
	//
	//  package mypackage
	//
	//  import "v.io/v23/security/access"
	//
	//  type MyTag string
	//
	//  const (
	//    Blue = MyTag("Blue")
	//    Red  = MyTag("Red")
	//  )
	//
	//  type MyObject interface {
	//    MyMethod() (string, error) {Blue}
	//
	//    // Allow clients to change access via the access.Object interface:
	//    SetPermissions(perms access.Permissions, version string) error         {Red}
	//    GetPermissions() (perms access.Permissions, version string, err error) {Blue}
	//  }
	permissions.ObjectServerMethods
	// Tidyable specifies that a service can be tidied.
	tidyable.TidyableServerMethods
	// Match checks if any of the given profiles contains an application
	// envelope for the given application version (specified through the
	// object name suffix) and if so, returns this envelope. If multiple
	// profile matches are possible, the method returns the first
	// matching profile, respecting the order of the input argument.
	//
	// If the version is not specified in the suffix, the envelope
	// corresponding to the latest version that matches any of the given
	// profiles is returned.  If several profiles match this version, the
	// envelope for the first matching profile is returned, respecting the
	// order of the input argument.
	Match(_ *context.T, _ rpc.ServerCall, profiles []string) (application.Envelope, error)
}

ApplicationServerMethods is the interface a server writer implements for Application.

Application provides access to application envelopes. An application envelope is identified by an application name and an application version, which are specified through the object name, and a profile name, which is specified using a method argument.

Example: /apps/search/v1.Match([]string{"base", "media"})

returns an application envelope that can be used for downloading
and executing the "search" application, version "v1", runnable
on either the "base" or "media" profile.

type ApplicationServerStub

type ApplicationServerStub interface {
	ApplicationServerStubMethods
	// Describe the Application interfaces.
	Describe__() []rpc.InterfaceDesc
}

ApplicationServerStub adds universal methods to ApplicationServerStubMethods.

func ApplicationServer

func ApplicationServer(impl ApplicationServerMethods) ApplicationServerStub

ApplicationServer returns a server stub for Application. It converts an implementation of ApplicationServerMethods into an object that may be used by rpc.Server.

type ApplicationServerStubMethods

type ApplicationServerStubMethods ApplicationServerMethods

ApplicationServerStubMethods is the server interface containing Application methods, as expected by rpc.Server. There is no difference between this interface and ApplicationServerMethods since there are no streaming methods.

type BinaryClientMethods

type BinaryClientMethods interface {
	// Object provides access control for Vanadium objects.
	//
	// Vanadium services implementing dynamic access control would typically embed
	// this interface and tag additional methods defined by the service with one of
	// Admin, Read, Write, Resolve etc. For example, the VDL definition of the
	// object would be:
	//
	//   package mypackage
	//
	//   import "v.io/v23/security/access"
	//   import "v.io/v23/services/permissions"
	//
	//   type MyObject interface {
	//     permissions.Object
	//     MyRead() (string, error) {access.Read}
	//     MyWrite(string) error    {access.Write}
	//   }
	//
	// If the set of pre-defined tags is insufficient, services may define their
	// own tag type and annotate all methods with this new type.
	//
	// Instead of embedding this Object interface, define SetPermissions and
	// GetPermissions in their own interface. Authorization policies will typically
	// respect annotations of a single type. For example, the VDL definition of an
	// object would be:
	//
	//  package mypackage
	//
	//  import "v.io/v23/security/access"
	//
	//  type MyTag string
	//
	//  const (
	//    Blue = MyTag("Blue")
	//    Red  = MyTag("Red")
	//  )
	//
	//  type MyObject interface {
	//    MyMethod() (string, error) {Blue}
	//
	//    // Allow clients to change access via the access.Object interface:
	//    SetPermissions(perms access.Permissions, version string) error         {Red}
	//    GetPermissions() (perms access.Permissions, version string, err error) {Blue}
	//  }
	permissions.ObjectClientMethods
	// Create expresses the intent to create a binary identified by the
	// object name suffix consisting of the given number of parts. The
	// mediaInfo argument contains metadata for the binary. If the suffix
	// identifies a binary that has already been created, the method
	// returns an error.
	Create(_ *context.T, nparts int32, mediaInfo MediaInfo, _ ...rpc.CallOpt) error
	// Delete deletes the binary identified by the object name
	// suffix. If the binary that has not been created, the method
	// returns an error.
	Delete(*context.T, ...rpc.CallOpt) error
	// Download opens a stream that can used for downloading the given
	// part of the binary identified by the object name suffix. If the
	// binary part has not been uploaded, the method returns an
	// error. If the Delete() method is invoked when the Download()
	// method is in progress, the outcome the Download() method is
	// undefined.
	Download(_ *context.T, part int32, _ ...rpc.CallOpt) (BinaryDownloadClientCall, error)
	// DownloadUrl returns a transient URL from which the binary
	// identified by the object name suffix can be downloaded using the
	// HTTP protocol. If not all parts of the binary have been uploaded,
	// the method returns an error.
	DownloadUrl(*context.T, ...rpc.CallOpt) (url string, ttl int64, _ error)
	// Stat returns information describing the parts of the binary
	// identified by the object name suffix, and its RFC 2046 media type.
	// If the binary has not been created, the method returns an error.
	Stat(*context.T, ...rpc.CallOpt) (Parts []binary.PartInfo, MediaInfo MediaInfo, _ error)
	// Upload opens a stream that can be used for uploading the given
	// part of the binary identified by the object name suffix. If the
	// binary has not been created, the method returns an error. If the
	// binary part has been uploaded, the method returns an error. If
	// the same binary part is being uploaded by another caller, the
	// method returns an error.
	Upload(_ *context.T, part int32, _ ...rpc.CallOpt) (BinaryUploadClientCall, error)
}

BinaryClientMethods is the client interface containing Binary methods.

Binary can be used to store and retrieve vanadium application binaries.

To create a binary, clients first invoke the Create() method that specifies the number of parts the binary consists of. Clients then uploads the individual parts through the Upload() method, which identifies the part being uploaded. To resume an upload after a failure, clients invoke the UploadStatus() method, which returns a slice that identifies which parts are missing.

To download a binary, clients first invoke Stat(), which returns information describing the binary, including the number of parts the binary consists of. Clients then download the individual parts through the Download() method, which identifies the part being downloaded. Alternatively, clients can download the binary through HTTP using a transient URL available through the DownloadUrl() method.

To delete the binary, clients invoke the Delete() method.

type BinaryClientStub

type BinaryClientStub interface {
	BinaryClientMethods
	rpc.UniversalServiceMethods
}

BinaryClientStub adds universal methods to BinaryClientMethods.

func BinaryClient

func BinaryClient(name string) BinaryClientStub

BinaryClient returns a client stub for Binary.

type BinaryDownloadClientCall

type BinaryDownloadClientCall interface {
	BinaryDownloadClientStream
	// Finish blocks until the server is done, and returns the positional return
	// values for call.
	//
	// Finish returns immediately if the call has been canceled; depending on the
	// timing the output could either be an error signaling cancelation, or the
	// valid positional return values from the server.
	//
	// Calling Finish is mandatory for releasing stream resources, unless the call
	// has been canceled or any of the other methods return an error.  Finish should
	// be called at most once.
	Finish() error
}

BinaryDownloadClientCall represents the call returned from Binary.Download.

type BinaryDownloadClientStream

type BinaryDownloadClientStream interface {
	// RecvStream returns the receiver side of the Binary.Download client stream.
	RecvStream() interface {
		// Advance stages an item so that it may be retrieved via Value.  Returns
		// true iff there is an item to retrieve.  Advance must be called before
		// Value is called.  May block if an item is not available.
		Advance() bool
		// Value returns the item that was staged by Advance.  May panic if Advance
		// returned false or was not called.  Never blocks.
		Value() []byte
		// Err returns any error encountered by Advance.  Never blocks.
		Err() error
	}
}

BinaryDownloadClientStream is the client stream for Binary.Download.

type BinaryDownloadServerCall

type BinaryDownloadServerCall interface {
	rpc.ServerCall
	BinaryDownloadServerStream
}

BinaryDownloadServerCall represents the context passed to Binary.Download.

type BinaryDownloadServerCallStub

type BinaryDownloadServerCallStub struct {
	rpc.StreamServerCall
}

BinaryDownloadServerCallStub is a wrapper that converts rpc.StreamServerCall into a typesafe stub that implements BinaryDownloadServerCall.

func (*BinaryDownloadServerCallStub) Init

Init initializes BinaryDownloadServerCallStub from rpc.StreamServerCall.

func (*BinaryDownloadServerCallStub) SendStream

func (s *BinaryDownloadServerCallStub) SendStream() interface {
	Send(item []byte) error
}

SendStream returns the send side of the Binary.Download server stream.

type BinaryDownloadServerStream

type BinaryDownloadServerStream interface {
	// SendStream returns the send side of the Binary.Download server stream.
	SendStream() interface {
		// Send places the item onto the output stream.  Returns errors encountered
		// while sending.  Blocks if there is no buffer space; will unblock when
		// buffer space is available.
		Send(item []byte) error
	}
}

BinaryDownloadServerStream is the server stream for Binary.Download.

type BinaryServerMethods

type BinaryServerMethods interface {
	// Object provides access control for Vanadium objects.
	//
	// Vanadium services implementing dynamic access control would typically embed
	// this interface and tag additional methods defined by the service with one of
	// Admin, Read, Write, Resolve etc. For example, the VDL definition of the
	// object would be:
	//
	//   package mypackage
	//
	//   import "v.io/v23/security/access"
	//   import "v.io/v23/services/permissions"
	//
	//   type MyObject interface {
	//     permissions.Object
	//     MyRead() (string, error) {access.Read}
	//     MyWrite(string) error    {access.Write}
	//   }
	//
	// If the set of pre-defined tags is insufficient, services may define their
	// own tag type and annotate all methods with this new type.
	//
	// Instead of embedding this Object interface, define SetPermissions and
	// GetPermissions in their own interface. Authorization policies will typically
	// respect annotations of a single type. For example, the VDL definition of an
	// object would be:
	//
	//  package mypackage
	//
	//  import "v.io/v23/security/access"
	//
	//  type MyTag string
	//
	//  const (
	//    Blue = MyTag("Blue")
	//    Red  = MyTag("Red")
	//  )
	//
	//  type MyObject interface {
	//    MyMethod() (string, error) {Blue}
	//
	//    // Allow clients to change access via the access.Object interface:
	//    SetPermissions(perms access.Permissions, version string) error         {Red}
	//    GetPermissions() (perms access.Permissions, version string, err error) {Blue}
	//  }
	permissions.ObjectServerMethods
	// Create expresses the intent to create a binary identified by the
	// object name suffix consisting of the given number of parts. The
	// mediaInfo argument contains metadata for the binary. If the suffix
	// identifies a binary that has already been created, the method
	// returns an error.
	Create(_ *context.T, _ rpc.ServerCall, nparts int32, mediaInfo MediaInfo) error
	// Delete deletes the binary identified by the object name
	// suffix. If the binary that has not been created, the method
	// returns an error.
	Delete(*context.T, rpc.ServerCall) error
	// Download opens a stream that can used for downloading the given
	// part of the binary identified by the object name suffix. If the
	// binary part has not been uploaded, the method returns an
	// error. If the Delete() method is invoked when the Download()
	// method is in progress, the outcome the Download() method is
	// undefined.
	Download(_ *context.T, _ BinaryDownloadServerCall, part int32) error
	// DownloadUrl returns a transient URL from which the binary
	// identified by the object name suffix can be downloaded using the
	// HTTP protocol. If not all parts of the binary have been uploaded,
	// the method returns an error.
	DownloadUrl(*context.T, rpc.ServerCall) (url string, ttl int64, _ error)
	// Stat returns information describing the parts of the binary
	// identified by the object name suffix, and its RFC 2046 media type.
	// If the binary has not been created, the method returns an error.
	Stat(*context.T, rpc.ServerCall) (Parts []binary.PartInfo, MediaInfo MediaInfo, _ error)
	// Upload opens a stream that can be used for uploading the given
	// part of the binary identified by the object name suffix. If the
	// binary has not been created, the method returns an error. If the
	// binary part has been uploaded, the method returns an error. If
	// the same binary part is being uploaded by another caller, the
	// method returns an error.
	Upload(_ *context.T, _ BinaryUploadServerCall, part int32) error
}

BinaryServerMethods is the interface a server writer implements for Binary.

Binary can be used to store and retrieve vanadium application binaries.

To create a binary, clients first invoke the Create() method that specifies the number of parts the binary consists of. Clients then uploads the individual parts through the Upload() method, which identifies the part being uploaded. To resume an upload after a failure, clients invoke the UploadStatus() method, which returns a slice that identifies which parts are missing.

To download a binary, clients first invoke Stat(), which returns information describing the binary, including the number of parts the binary consists of. Clients then download the individual parts through the Download() method, which identifies the part being downloaded. Alternatively, clients can download the binary through HTTP using a transient URL available through the DownloadUrl() method.

To delete the binary, clients invoke the Delete() method.

type BinaryServerStub

type BinaryServerStub interface {
	BinaryServerStubMethods
	// Describe the Binary interfaces.
	Describe__() []rpc.InterfaceDesc
}

BinaryServerStub adds universal methods to BinaryServerStubMethods.

func BinaryServer

func BinaryServer(impl BinaryServerMethods) BinaryServerStub

BinaryServer returns a server stub for Binary. It converts an implementation of BinaryServerMethods into an object that may be used by rpc.Server.

type BinaryServerStubMethods

type BinaryServerStubMethods interface {
	// Object provides access control for Vanadium objects.
	//
	// Vanadium services implementing dynamic access control would typically embed
	// this interface and tag additional methods defined by the service with one of
	// Admin, Read, Write, Resolve etc. For example, the VDL definition of the
	// object would be:
	//
	//   package mypackage
	//
	//   import "v.io/v23/security/access"
	//   import "v.io/v23/services/permissions"
	//
	//   type MyObject interface {
	//     permissions.Object
	//     MyRead() (string, error) {access.Read}
	//     MyWrite(string) error    {access.Write}
	//   }
	//
	// If the set of pre-defined tags is insufficient, services may define their
	// own tag type and annotate all methods with this new type.
	//
	// Instead of embedding this Object interface, define SetPermissions and
	// GetPermissions in their own interface. Authorization policies will typically
	// respect annotations of a single type. For example, the VDL definition of an
	// object would be:
	//
	//  package mypackage
	//
	//  import "v.io/v23/security/access"
	//
	//  type MyTag string
	//
	//  const (
	//    Blue = MyTag("Blue")
	//    Red  = MyTag("Red")
	//  )
	//
	//  type MyObject interface {
	//    MyMethod() (string, error) {Blue}
	//
	//    // Allow clients to change access via the access.Object interface:
	//    SetPermissions(perms access.Permissions, version string) error         {Red}
	//    GetPermissions() (perms access.Permissions, version string, err error) {Blue}
	//  }
	permissions.ObjectServerStubMethods
	// Create expresses the intent to create a binary identified by the
	// object name suffix consisting of the given number of parts. The
	// mediaInfo argument contains metadata for the binary. If the suffix
	// identifies a binary that has already been created, the method
	// returns an error.
	Create(_ *context.T, _ rpc.ServerCall, nparts int32, mediaInfo MediaInfo) error
	// Delete deletes the binary identified by the object name
	// suffix. If the binary that has not been created, the method
	// returns an error.
	Delete(*context.T, rpc.ServerCall) error
	// Download opens a stream that can used for downloading the given
	// part of the binary identified by the object name suffix. If the
	// binary part has not been uploaded, the method returns an
	// error. If the Delete() method is invoked when the Download()
	// method is in progress, the outcome the Download() method is
	// undefined.
	Download(_ *context.T, _ *BinaryDownloadServerCallStub, part int32) error
	// DownloadUrl returns a transient URL from which the binary
	// identified by the object name suffix can be downloaded using the
	// HTTP protocol. If not all parts of the binary have been uploaded,
	// the method returns an error.
	DownloadUrl(*context.T, rpc.ServerCall) (url string, ttl int64, _ error)
	// Stat returns information describing the parts of the binary
	// identified by the object name suffix, and its RFC 2046 media type.
	// If the binary has not been created, the method returns an error.
	Stat(*context.T, rpc.ServerCall) (Parts []binary.PartInfo, MediaInfo MediaInfo, _ error)
	// Upload opens a stream that can be used for uploading the given
	// part of the binary identified by the object name suffix. If the
	// binary has not been created, the method returns an error. If the
	// binary part has been uploaded, the method returns an error. If
	// the same binary part is being uploaded by another caller, the
	// method returns an error.
	Upload(_ *context.T, _ *BinaryUploadServerCallStub, part int32) error
}

BinaryServerStubMethods is the server interface containing Binary methods, as expected by rpc.Server. The only difference between this interface and BinaryServerMethods is the streaming methods.

type BinaryUploadClientCall

type BinaryUploadClientCall interface {
	BinaryUploadClientStream
	// Finish performs the equivalent of SendStream().Close, then blocks until
	// the server is done, and returns the positional return values for the call.
	//
	// Finish returns immediately if the call has been canceled; depending on the
	// timing the output could either be an error signaling cancelation, or the
	// valid positional return values from the server.
	//
	// Calling Finish is mandatory for releasing stream resources, unless the call
	// has been canceled or any of the other methods return an error.  Finish should
	// be called at most once.
	Finish() error
}

BinaryUploadClientCall represents the call returned from Binary.Upload.

type BinaryUploadClientStream

type BinaryUploadClientStream interface {
	// SendStream returns the send side of the Binary.Upload client stream.
	SendStream() interface {
		// Send places the item onto the output stream.  Returns errors
		// encountered while sending, or if Send is called after Close or
		// the stream has been canceled.  Blocks if there is no buffer
		// space; will unblock when buffer space is available or after
		// the stream has been canceled.
		Send(item []byte) error
		// Close indicates to the server that no more items will be sent;
		// server Recv calls will receive io.EOF after all sent items.
		// This is an optional call - e.g. a client might call Close if it
		// needs to continue receiving items from the server after it's
		// done sending.  Returns errors encountered while closing, or if
		// Close is called after the stream has been canceled.  Like Send,
		// blocks if there is no buffer space available.
		Close() error
	}
}

BinaryUploadClientStream is the client stream for Binary.Upload.

type BinaryUploadServerCall

type BinaryUploadServerCall interface {
	rpc.ServerCall
	BinaryUploadServerStream
}

BinaryUploadServerCall represents the context passed to Binary.Upload.

type BinaryUploadServerCallStub

type BinaryUploadServerCallStub struct {
	rpc.StreamServerCall
	// contains filtered or unexported fields
}

BinaryUploadServerCallStub is a wrapper that converts rpc.StreamServerCall into a typesafe stub that implements BinaryUploadServerCall.

func (*BinaryUploadServerCallStub) Init

Init initializes BinaryUploadServerCallStub from rpc.StreamServerCall.

func (*BinaryUploadServerCallStub) RecvStream

func (s *BinaryUploadServerCallStub) RecvStream() interface {
	Advance() bool
	Value() []byte
	Err() error
}

RecvStream returns the receiver side of the Binary.Upload server stream.

type BinaryUploadServerStream

type BinaryUploadServerStream interface {
	// RecvStream returns the receiver side of the Binary.Upload server stream.
	RecvStream() interface {
		// Advance stages an item so that it may be retrieved via Value.  Returns
		// true iff there is an item to retrieve.  Advance must be called before
		// Value is called.  May block if an item is not available.
		Advance() bool
		// Value returns the item that was staged by Advance.  May panic if Advance
		// returned false or was not called.  Never blocks.
		Value() []byte
		// Err returns any error encountered by Advance.  Never blocks.
		Err() error
	}
}

BinaryUploadServerStream is the server stream for Binary.Upload.

type MediaInfo

type MediaInfo struct {
	Type     string // The media-type (RFC 2046)
	Encoding string // The file encoding is optional and can be either "gzip" or "bzip2".
}

MediaInfo contains the metadata information for a binary.

func (MediaInfo) VDLIsZero

func (x MediaInfo) VDLIsZero() bool

func (*MediaInfo) VDLRead

func (x *MediaInfo) VDLRead(dec vdl.Decoder) error

func (MediaInfo) VDLReflect

func (MediaInfo) VDLReflect(struct {
	Name string `vdl:"v.io/v23/services/repository.MediaInfo"`
})

func (MediaInfo) VDLWrite

func (x MediaInfo) VDLWrite(enc vdl.Encoder) error

type ProfileClientMethods

type ProfileClientMethods interface {
	// Label is the human-readable profile key for the profile,
	// e.g. "linux-media". The label can be used to uniquely identify
	// the profile (for the purpose of matching application binaries and
	// devices).
	Label(*context.T, ...rpc.CallOpt) (string, error)
	// Description is a free-text description of the profile, meant for
	// human consumption.
	Description(*context.T, ...rpc.CallOpt) (string, error)
}

ProfileClientMethods is the client interface containing Profile methods.

Profile abstracts a device's ability to run binaries, and hides specifics such as the operating system, hardware architecture, and the set of installed libraries. Profiles describe binaries and devices, and are used to match them.

type ProfileClientStub

type ProfileClientStub interface {
	ProfileClientMethods
	rpc.UniversalServiceMethods
}

ProfileClientStub adds universal methods to ProfileClientMethods.

func ProfileClient

func ProfileClient(name string) ProfileClientStub

ProfileClient returns a client stub for Profile.

type ProfileServerMethods

type ProfileServerMethods interface {
	// Label is the human-readable profile key for the profile,
	// e.g. "linux-media". The label can be used to uniquely identify
	// the profile (for the purpose of matching application binaries and
	// devices).
	Label(*context.T, rpc.ServerCall) (string, error)
	// Description is a free-text description of the profile, meant for
	// human consumption.
	Description(*context.T, rpc.ServerCall) (string, error)
}

ProfileServerMethods is the interface a server writer implements for Profile.

Profile abstracts a device's ability to run binaries, and hides specifics such as the operating system, hardware architecture, and the set of installed libraries. Profiles describe binaries and devices, and are used to match them.

type ProfileServerStub

type ProfileServerStub interface {
	ProfileServerStubMethods
	// Describe the Profile interfaces.
	Describe__() []rpc.InterfaceDesc
}

ProfileServerStub adds universal methods to ProfileServerStubMethods.

func ProfileServer

func ProfileServer(impl ProfileServerMethods) ProfileServerStub

ProfileServer returns a server stub for Profile. It converts an implementation of ProfileServerMethods into an object that may be used by rpc.Server.

type ProfileServerStubMethods

type ProfileServerStubMethods ProfileServerMethods

ProfileServerStubMethods is the server interface containing Profile methods, as expected by rpc.Server. There is no difference between this interface and ProfileServerMethods since there are no streaming methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL