Documentation ¶
Overview ¶
Package repository augments the v.io/v23/services/repository interfaces with implementation-specific configuration methods.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ApplicationDesc rpc.InterfaceDesc = descApplication
ApplicationDesc describes the Application interface.
var ProfileDesc rpc.InterfaceDesc = descProfile
ProfileDesc describes the Profile interface.
Functions ¶
This section is empty.
Types ¶
type ApplicationClientMethods ¶
type ApplicationClientMethods interface { // 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. repository.ApplicationClientMethods // Put adds the given application envelope for the given profile and // application version (required, and specified through the object name // suffix). // // An error is returned if an envelope already exists, unless the // overwrite option is set. Put(_ *context.T, Profile string, Envelope application.Envelope, Overwrite bool, _ ...rpc.CallOpt) error // Remove removes the application envelope for the given profile // name and application version (specified through the object name // suffix). // // If no version is specified as part of the suffix, the method removes // all versions for the given profile. // // If the profile is the string "*", all profiles are removed for the // given version (or for all versions if the version is not specified). Remove(_ *context.T, Profile string, _ ...rpc.CallOpt) error // Profiles returns the supported profiles for the application version // specified through the object name suffix. If the version is not // specified, Profiles returns the union of profiles across all // versions. Profiles(*context.T, ...rpc.CallOpt) ([]string, error) }
ApplicationClientMethods is the client interface containing Application methods.
Application describes an application repository internally. Besides the public Application interface, it allows adding and removing application envelopes, as well as querying for a list of supported profiles.
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 { // 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. repository.ApplicationServerMethods // Put adds the given application envelope for the given profile and // application version (required, and specified through the object name // suffix). // // An error is returned if an envelope already exists, unless the // overwrite option is set. Put(_ *context.T, _ rpc.ServerCall, Profile string, Envelope application.Envelope, Overwrite bool) error // Remove removes the application envelope for the given profile // name and application version (specified through the object name // suffix). // // If no version is specified as part of the suffix, the method removes // all versions for the given profile. // // If the profile is the string "*", all profiles are removed for the // given version (or for all versions if the version is not specified). Remove(_ *context.T, _ rpc.ServerCall, Profile string) error // Profiles returns the supported profiles for the application version // specified through the object name suffix. If the version is not // specified, Profiles returns the union of profiles across all // versions. Profiles(*context.T, rpc.ServerCall) ([]string, error) }
ApplicationServerMethods is the interface a server writer implements for Application.
Application describes an application repository internally. Besides the public Application interface, it allows adding and removing application envelopes, as well as querying for a list of supported profiles.
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 ProfileClientMethods ¶
type ProfileClientMethods interface { // 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. repository.ProfileClientMethods // Specification returns the profile specification for the profile // identified through the object name suffix. Specification(*context.T, ...rpc.CallOpt) (profile.Specification, error) // Put sets the profile specification for the profile identified // through the object name suffix. Put(_ *context.T, Specification profile.Specification, _ ...rpc.CallOpt) error // Remove removes the profile specification for the profile // identified through the object name suffix. Remove(*context.T, ...rpc.CallOpt) error }
ProfileClientMethods is the client interface containing Profile methods.
Profile describes a profile internally. Besides the public Profile interface, it allows to add and remove profile specifications.
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 { // 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. repository.ProfileServerMethods // Specification returns the profile specification for the profile // identified through the object name suffix. Specification(*context.T, rpc.ServerCall) (profile.Specification, error) // Put sets the profile specification for the profile identified // through the object name suffix. Put(_ *context.T, _ rpc.ServerCall, Specification profile.Specification) error // Remove removes the profile specification for the profile // identified through the object name suffix. Remove(*context.T, rpc.ServerCall) error }
ProfileServerMethods is the interface a server writer implements for Profile.
Profile describes a profile internally. Besides the public Profile interface, it allows to add and remove profile specifications.
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.