Documentation
¶
Index ¶
- Constants
- Variables
- func NewLinkServiceHandler(svc LinkServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type GetAgentManifestRequest
- func (x *GetAgentManifestRequest) ClearCluster()
- func (x *GetAgentManifestRequest) GetCluster() string
- func (x *GetAgentManifestRequest) HasCluster() bool
- func (*GetAgentManifestRequest) ProtoMessage()
- func (x *GetAgentManifestRequest) ProtoReflect() protoreflect.Message
- func (x *GetAgentManifestRequest) Reset()
- func (x *GetAgentManifestRequest) SetCluster(v string)
- func (x *GetAgentManifestRequest) String() string
- type GetAgentManifestRequest_builder
- type GetAgentManifestResponse
- func (x *GetAgentManifestResponse) ClearManifest()
- func (x *GetAgentManifestResponse) ClearUrl()
- func (x *GetAgentManifestResponse) GetManifest() string
- func (x *GetAgentManifestResponse) GetUrl() string
- func (x *GetAgentManifestResponse) HasManifest() bool
- func (x *GetAgentManifestResponse) HasUrl() bool
- func (*GetAgentManifestResponse) ProtoMessage()
- func (x *GetAgentManifestResponse) ProtoReflect() protoreflect.Message
- func (x *GetAgentManifestResponse) Reset()
- func (x *GetAgentManifestResponse) SetManifest(v string)
- func (x *GetAgentManifestResponse) SetUrl(v string)
- func (x *GetAgentManifestResponse) String() string
- type GetAgentManifestResponse_builder
- type Link
- func (x *Link) ClearAgentVersion()
- func (x *Link) ClearCluster()
- func (x *Link) GetAgentVersion() string
- func (x *Link) GetCluster() string
- func (x *Link) HasAgentVersion() bool
- func (x *Link) HasCluster() bool
- func (*Link) ProtoMessage()
- func (x *Link) ProtoReflect() protoreflect.Message
- func (x *Link) Reset()
- func (x *Link) SetAgentVersion(v string)
- func (x *Link) SetCluster(v string)
- func (x *Link) String() string
- type LinkServiceClient
- type LinkServiceHandler
- type Link_builder
- type ListLinksRequest
- type ListLinksRequest_builder
- type ListLinksResponse
- type ListLinksResponse_builder
- type RegisterRequest
- func (x *RegisterRequest) ClearAgentId()
- func (x *RegisterRequest) ClearAgentVersion()
- func (x *RegisterRequest) ClearCluster()
- func (x *RegisterRequest) ClearCsr()
- func (x *RegisterRequest) GetAgentId() string
- func (x *RegisterRequest) GetAgentVersion() string
- func (x *RegisterRequest) GetCluster() string
- func (x *RegisterRequest) GetCsr() []byte
- func (x *RegisterRequest) HasAgentId() bool
- func (x *RegisterRequest) HasAgentVersion() bool
- func (x *RegisterRequest) HasCluster() bool
- func (x *RegisterRequest) HasCsr() bool
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) SetAgentId(v string)
- func (x *RegisterRequest) SetAgentVersion(v string)
- func (x *RegisterRequest) SetCluster(v string)
- func (x *RegisterRequest) SetCsr(v []byte)
- func (x *RegisterRequest) String() string
- type RegisterRequest_builder
- type RegisterResponse
- func (x *RegisterResponse) ClearCaCertificate()
- func (x *RegisterResponse) ClearCertificate()
- func (x *RegisterResponse) ClearEndpoint()
- func (x *RegisterResponse) ClearServerVersion()
- func (x *RegisterResponse) GetCaCertificate() []byte
- func (x *RegisterResponse) GetCertificate() []byte
- func (x *RegisterResponse) GetEndpoint() string
- func (x *RegisterResponse) GetServerVersion() string
- func (x *RegisterResponse) HasCaCertificate() bool
- func (x *RegisterResponse) HasCertificate() bool
- func (x *RegisterResponse) HasEndpoint() bool
- func (x *RegisterResponse) HasServerVersion() bool
- func (*RegisterResponse) ProtoMessage()
- func (x *RegisterResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterResponse) Reset()
- func (x *RegisterResponse) SetCaCertificate(v []byte)
- func (x *RegisterResponse) SetCertificate(v []byte)
- func (x *RegisterResponse) SetEndpoint(v string)
- func (x *RegisterResponse) SetServerVersion(v string)
- func (x *RegisterResponse) String() string
- type RegisterResponse_builder
- type UnimplementedLinkServiceHandler
- func (UnimplementedLinkServiceHandler) GetAgentManifest(context.Context, *GetAgentManifestRequest) (*GetAgentManifestResponse, error)
- func (UnimplementedLinkServiceHandler) ListLinks(context.Context, *ListLinksRequest) (*ListLinksResponse, error)
- func (UnimplementedLinkServiceHandler) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
Constants ¶
const ( // LinkServiceListLinksProcedure is the fully-qualified name of the LinkService's ListLinks RPC. LinkServiceListLinksProcedure = "/otterscale.link.v1.LinkService/ListLinks" // LinkServiceRegisterProcedure is the fully-qualified name of the LinkService's Register RPC. LinkServiceRegisterProcedure = "/otterscale.link.v1.LinkService/Register" // LinkServiceGetAgentManifestProcedure is the fully-qualified name of the LinkService's // GetAgentManifest RPC. LinkServiceGetAgentManifestProcedure = "/otterscale.link.v1.LinkService/GetAgentManifest" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// LinkServiceName is the fully-qualified name of the LinkService service.
LinkServiceName = "otterscale.link.v1.LinkService"
)
Variables ¶
var File_link_v1_link_proto protoreflect.FileDescriptor
Functions ¶
func NewLinkServiceHandler ¶
func NewLinkServiceHandler(svc LinkServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewLinkServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type GetAgentManifestRequest ¶
type GetAgentManifestRequest struct {
XXX_raceDetectHookData protoimpl.RaceDetectHookData
XXX_presence [1]uint32
// contains filtered or unexported fields
}
GetAgentManifestRequest identifies the target cluster for which the agent installation manifest should be generated.
func (*GetAgentManifestRequest) ClearCluster ¶
func (x *GetAgentManifestRequest) ClearCluster()
func (*GetAgentManifestRequest) GetCluster ¶
func (x *GetAgentManifestRequest) GetCluster() string
func (*GetAgentManifestRequest) HasCluster ¶
func (x *GetAgentManifestRequest) HasCluster() bool
func (*GetAgentManifestRequest) ProtoMessage ¶
func (*GetAgentManifestRequest) ProtoMessage()
func (*GetAgentManifestRequest) ProtoReflect ¶
func (x *GetAgentManifestRequest) ProtoReflect() protoreflect.Message
func (*GetAgentManifestRequest) Reset ¶
func (x *GetAgentManifestRequest) Reset()
func (*GetAgentManifestRequest) SetCluster ¶
func (x *GetAgentManifestRequest) SetCluster(v string)
func (*GetAgentManifestRequest) String ¶
func (x *GetAgentManifestRequest) String() string
type GetAgentManifestRequest_builder ¶
type GetAgentManifestRequest_builder struct {
// The cluster name the agent will register under.
Cluster *string
// contains filtered or unexported fields
}
func (GetAgentManifestRequest_builder) Build ¶
func (b0 GetAgentManifestRequest_builder) Build() *GetAgentManifestRequest
type GetAgentManifestResponse ¶
type GetAgentManifestResponse struct {
XXX_raceDetectHookData protoimpl.RaceDetectHookData
XXX_presence [1]uint32
// contains filtered or unexported fields
}
GetAgentManifestResponse contains the multi-document YAML manifest that can be applied via kubectl to install the agent.
func (*GetAgentManifestResponse) ClearManifest ¶
func (x *GetAgentManifestResponse) ClearManifest()
func (*GetAgentManifestResponse) ClearUrl ¶
func (x *GetAgentManifestResponse) ClearUrl()
func (*GetAgentManifestResponse) GetManifest ¶
func (x *GetAgentManifestResponse) GetManifest() string
func (*GetAgentManifestResponse) GetUrl ¶
func (x *GetAgentManifestResponse) GetUrl() string
func (*GetAgentManifestResponse) HasManifest ¶
func (x *GetAgentManifestResponse) HasManifest() bool
func (*GetAgentManifestResponse) HasUrl ¶
func (x *GetAgentManifestResponse) HasUrl() bool
func (*GetAgentManifestResponse) ProtoMessage ¶
func (*GetAgentManifestResponse) ProtoMessage()
func (*GetAgentManifestResponse) ProtoReflect ¶
func (x *GetAgentManifestResponse) ProtoReflect() protoreflect.Message
func (*GetAgentManifestResponse) Reset ¶
func (x *GetAgentManifestResponse) Reset()
func (*GetAgentManifestResponse) SetManifest ¶
func (x *GetAgentManifestResponse) SetManifest(v string)
func (*GetAgentManifestResponse) SetUrl ¶
func (x *GetAgentManifestResponse) SetUrl(v string)
func (*GetAgentManifestResponse) String ¶
func (x *GetAgentManifestResponse) String() string
type GetAgentManifestResponse_builder ¶
type GetAgentManifestResponse_builder struct {
// Multi-document YAML containing Namespace, ServiceAccount,
// ClusterRoleBinding, and Deployment resources.
Manifest *string
// URL with an embedded HMAC token that serves the manifest as raw
// YAML. Users can run `kubectl apply -f <url>` directly.
Url *string
// contains filtered or unexported fields
}
func (GetAgentManifestResponse_builder) Build ¶
func (b0 GetAgentManifestResponse_builder) Build() *GetAgentManifestResponse
type Link ¶
type Link struct {
XXX_raceDetectHookData protoimpl.RaceDetectHookData
XXX_presence [1]uint32
// contains filtered or unexported fields
}
func (*Link) ClearAgentVersion ¶
func (x *Link) ClearAgentVersion()
func (*Link) ClearCluster ¶
func (x *Link) ClearCluster()
func (*Link) GetAgentVersion ¶
func (*Link) GetCluster ¶
func (*Link) HasAgentVersion ¶
func (*Link) HasCluster ¶
func (*Link) ProtoMessage ¶
func (*Link) ProtoMessage()
func (*Link) ProtoReflect ¶
func (x *Link) ProtoReflect() protoreflect.Message
func (*Link) SetAgentVersion ¶
func (*Link) SetCluster ¶
type LinkServiceClient ¶
type LinkServiceClient interface {
// ListLinks returns all cluster identifiers that the current agent
// is registered to. This is used to discover which clusters are available
// for tunnel connections.
ListLinks(context.Context, *ListLinksRequest) (*ListLinksResponse, error)
// Register allows an agent to register itself with the tunnel server.
// The agent sends its cluster identity and tunnel port; the server responds
// with its fingerprint so the agent can verify the tunnel connection.
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
// GetAgentManifest returns a multi-document YAML manifest for installing
// the otterscale agent on a target Kubernetes cluster. The manifest
// includes a Namespace, ServiceAccount, ClusterRoleBinding (binding the
// caller to cluster-admin), and a Deployment running the agent.
GetAgentManifest(context.Context, *GetAgentManifestRequest) (*GetAgentManifestResponse, error)
}
LinkServiceClient is a client for the otterscale.link.v1.LinkService service.
func NewLinkServiceClient ¶
func NewLinkServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) LinkServiceClient
NewLinkServiceClient constructs a client for the otterscale.link.v1.LinkService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type LinkServiceHandler ¶
type LinkServiceHandler interface {
// ListLinks returns all cluster identifiers that the current agent
// is registered to. This is used to discover which clusters are available
// for tunnel connections.
ListLinks(context.Context, *ListLinksRequest) (*ListLinksResponse, error)
// Register allows an agent to register itself with the tunnel server.
// The agent sends its cluster identity and tunnel port; the server responds
// with its fingerprint so the agent can verify the tunnel connection.
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
// GetAgentManifest returns a multi-document YAML manifest for installing
// the otterscale agent on a target Kubernetes cluster. The manifest
// includes a Namespace, ServiceAccount, ClusterRoleBinding (binding the
// caller to cluster-admin), and a Deployment running the agent.
GetAgentManifest(context.Context, *GetAgentManifestRequest) (*GetAgentManifestResponse, error)
}
LinkServiceHandler is an implementation of the otterscale.link.v1.LinkService service.
type Link_builder ¶
type Link_builder struct {
// The cluster name.
Cluster *string
// The version of the agent binary (e.g. "v1.2.3"), set at build time.
AgentVersion *string
// contains filtered or unexported fields
}
func (Link_builder) Build ¶
func (b0 Link_builder) Build() *Link
type ListLinksRequest ¶
type ListLinksRequest struct {
// contains filtered or unexported fields
}
ListLinksRequest is an empty request message for listing links.
func (*ListLinksRequest) ProtoMessage ¶
func (*ListLinksRequest) ProtoMessage()
func (*ListLinksRequest) ProtoReflect ¶
func (x *ListLinksRequest) ProtoReflect() protoreflect.Message
func (*ListLinksRequest) Reset ¶
func (x *ListLinksRequest) Reset()
func (*ListLinksRequest) String ¶
func (x *ListLinksRequest) String() string
type ListLinksRequest_builder ¶
type ListLinksRequest_builder struct {
// contains filtered or unexported fields
}
func (ListLinksRequest_builder) Build ¶
func (b0 ListLinksRequest_builder) Build() *ListLinksRequest
type ListLinksResponse ¶
type ListLinksResponse struct {
// contains filtered or unexported fields
}
ListLinksResponse contains the list of links the agent is registered to.
func (*ListLinksResponse) GetLinks ¶
func (x *ListLinksResponse) GetLinks() []*Link
func (*ListLinksResponse) ProtoMessage ¶
func (*ListLinksResponse) ProtoMessage()
func (*ListLinksResponse) ProtoReflect ¶
func (x *ListLinksResponse) ProtoReflect() protoreflect.Message
func (*ListLinksResponse) Reset ¶
func (x *ListLinksResponse) Reset()
func (*ListLinksResponse) SetLinks ¶
func (x *ListLinksResponse) SetLinks(v []*Link)
func (*ListLinksResponse) String ¶
func (x *ListLinksResponse) String() string
type ListLinksResponse_builder ¶
type ListLinksResponse_builder struct {
// The list of links.
Links []*Link
// contains filtered or unexported fields
}
func (ListLinksResponse_builder) Build ¶
func (b0 ListLinksResponse_builder) Build() *ListLinksResponse
type RegisterRequest ¶
type RegisterRequest struct {
XXX_raceDetectHookData protoimpl.RaceDetectHookData
XXX_presence [1]uint32
// contains filtered or unexported fields
}
RegisterRequest contains the agent's cluster identity and a CSR for mTLS certificate issuance.
func (*RegisterRequest) ClearAgentId ¶
func (x *RegisterRequest) ClearAgentId()
func (*RegisterRequest) ClearAgentVersion ¶
func (x *RegisterRequest) ClearAgentVersion()
func (*RegisterRequest) ClearCluster ¶
func (x *RegisterRequest) ClearCluster()
func (*RegisterRequest) ClearCsr ¶
func (x *RegisterRequest) ClearCsr()
func (*RegisterRequest) GetAgentId ¶
func (x *RegisterRequest) GetAgentId() string
func (*RegisterRequest) GetAgentVersion ¶
func (x *RegisterRequest) GetAgentVersion() string
func (*RegisterRequest) GetCluster ¶
func (x *RegisterRequest) GetCluster() string
func (*RegisterRequest) GetCsr ¶
func (x *RegisterRequest) GetCsr() []byte
func (*RegisterRequest) HasAgentId ¶
func (x *RegisterRequest) HasAgentId() bool
func (*RegisterRequest) HasAgentVersion ¶
func (x *RegisterRequest) HasAgentVersion() bool
func (*RegisterRequest) HasCluster ¶
func (x *RegisterRequest) HasCluster() bool
func (*RegisterRequest) HasCsr ¶
func (x *RegisterRequest) HasCsr() bool
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) SetAgentId ¶
func (x *RegisterRequest) SetAgentId(v string)
func (*RegisterRequest) SetAgentVersion ¶
func (x *RegisterRequest) SetAgentVersion(v string)
func (*RegisterRequest) SetCluster ¶
func (x *RegisterRequest) SetCluster(v string)
func (*RegisterRequest) SetCsr ¶
func (x *RegisterRequest) SetCsr(v []byte)
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterRequest_builder ¶
type RegisterRequest_builder struct {
// The cluster identifier this agent belongs to.
Cluster *string
// PEM-encoded PKCS#10 certificate signing request. The server signs
// this with its internal CA and returns the issued certificate.
Csr []byte
// The agent identifier this agent uses to register with the server.
AgentId *string
// The version of the agent binary (e.g. "v1.2.3"), set at build time.
AgentVersion *string
// contains filtered or unexported fields
}
func (RegisterRequest_builder) Build ¶
func (b0 RegisterRequest_builder) Build() *RegisterRequest
type RegisterResponse ¶
type RegisterResponse struct {
XXX_raceDetectHookData protoimpl.RaceDetectHookData
XXX_presence [1]uint32
// contains filtered or unexported fields
}
RegisterResponse contains a CA-signed certificate and the CA certificate so the agent can establish an mTLS tunnel connection.
func (*RegisterResponse) ClearCaCertificate ¶
func (x *RegisterResponse) ClearCaCertificate()
func (*RegisterResponse) ClearCertificate ¶
func (x *RegisterResponse) ClearCertificate()
func (*RegisterResponse) ClearEndpoint ¶
func (x *RegisterResponse) ClearEndpoint()
func (*RegisterResponse) ClearServerVersion ¶
func (x *RegisterResponse) ClearServerVersion()
func (*RegisterResponse) GetCaCertificate ¶
func (x *RegisterResponse) GetCaCertificate() []byte
func (*RegisterResponse) GetCertificate ¶
func (x *RegisterResponse) GetCertificate() []byte
func (*RegisterResponse) GetEndpoint ¶
func (x *RegisterResponse) GetEndpoint() string
func (*RegisterResponse) GetServerVersion ¶
func (x *RegisterResponse) GetServerVersion() string
func (*RegisterResponse) HasCaCertificate ¶
func (x *RegisterResponse) HasCaCertificate() bool
func (*RegisterResponse) HasCertificate ¶
func (x *RegisterResponse) HasCertificate() bool
func (*RegisterResponse) HasEndpoint ¶
func (x *RegisterResponse) HasEndpoint() bool
func (*RegisterResponse) HasServerVersion ¶
func (x *RegisterResponse) HasServerVersion() bool
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) SetCaCertificate ¶
func (x *RegisterResponse) SetCaCertificate(v []byte)
func (*RegisterResponse) SetCertificate ¶
func (x *RegisterResponse) SetCertificate(v []byte)
func (*RegisterResponse) SetEndpoint ¶
func (x *RegisterResponse) SetEndpoint(v string)
func (*RegisterResponse) SetServerVersion ¶
func (x *RegisterResponse) SetServerVersion(v string)
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type RegisterResponse_builder ¶
type RegisterResponse_builder struct {
// The loopback endpoint reserved for this cluster tunnel.
Endpoint *string
// PEM-encoded X.509 certificate signed by the server's CA.
Certificate []byte
// PEM-encoded CA certificate for verifying the tunnel server.
CaCertificate []byte
// The version of the server binary (e.g. "v1.2.3"), set at build time.
// Agents compare this against their own version to decide whether a
// self-update is needed.
ServerVersion *string
// contains filtered or unexported fields
}
func (RegisterResponse_builder) Build ¶
func (b0 RegisterResponse_builder) Build() *RegisterResponse
type UnimplementedLinkServiceHandler ¶
type UnimplementedLinkServiceHandler struct{}
UnimplementedLinkServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedLinkServiceHandler) GetAgentManifest ¶
func (UnimplementedLinkServiceHandler) GetAgentManifest(context.Context, *GetAgentManifestRequest) (*GetAgentManifestResponse, error)
func (UnimplementedLinkServiceHandler) ListLinks ¶
func (UnimplementedLinkServiceHandler) ListLinks(context.Context, *ListLinksRequest) (*ListLinksResponse, error)
func (UnimplementedLinkServiceHandler) Register ¶
func (UnimplementedLinkServiceHandler) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)