Documentation
¶
Index ¶
- Constants
- type BlobsControl
- type MembershipControl
- type MeshConnector
- type Metrics
- type MetricsSource
- type Option
- type PlacementControl
- type Server
- type Service
- func (s *Service) CallWorkload(ctx context.Context, req *controlv1.CallWorkloadRequest) (*controlv1.CallWorkloadResponse, error)
- func (s *Service) ConnectPeer(ctx context.Context, req *controlv1.ConnectPeerRequest) (*controlv1.ConnectPeerResponse, error)
- func (s *Service) ConnectService(ctx context.Context, req *controlv1.ConnectServiceRequest) (*controlv1.ConnectServiceResponse, error)
- func (s *Service) DenyPeer(_ context.Context, req *controlv1.DenyPeerRequest) (*controlv1.DenyPeerResponse, error)
- func (s *Service) DisconnectService(_ context.Context, req *controlv1.DisconnectServiceRequest) (*controlv1.DisconnectServiceResponse, error)
- func (s *Service) FetchBlob(ctx context.Context, req *controlv1.FetchBlobRequest) (*controlv1.FetchBlobResponse, error)
- func (s *Service) GetBootstrapInfo(_ context.Context, _ *controlv1.GetBootstrapInfoRequest) (*controlv1.GetBootstrapInfoResponse, error)
- func (s *Service) GetMetrics(_ context.Context, _ *controlv1.GetMetricsRequest) (*controlv1.GetMetricsResponse, error)
- func (s *Service) GetStatus(_ context.Context, _ *controlv1.GetStatusRequest) (*controlv1.GetStatusResponse, error)
- func (s *Service) IssueCert(ctx context.Context, req *controlv1.IssueCertRequest) (*controlv1.IssueCertResponse, error)
- func (s *Service) ListStatic(_ context.Context, _ *controlv1.ListStaticRequest) (*controlv1.ListStaticResponse, error)
- func (s *Service) RegisterService(_ context.Context, req *controlv1.RegisterServiceRequest) (*controlv1.RegisterServiceResponse, error)
- func (s *Service) RemoveBlob(_ context.Context, req *controlv1.RemoveBlobRequest) (*controlv1.RemoveBlobResponse, error)
- func (s *Service) SeedStatic(_ context.Context, req *controlv1.SeedStaticRequest) (*controlv1.SeedStaticResponse, error)
- func (s *Service) SeedWorkload(...) error
- func (s *Service) Shutdown(_ context.Context, _ *controlv1.ShutdownRequest) (*controlv1.ShutdownResponse, error)
- func (s *Service) UnregisterService(_ context.Context, req *controlv1.UnregisterServiceRequest) (*controlv1.UnregisterServiceResponse, error)
- func (s *Service) UnseedStatic(_ context.Context, req *controlv1.UnseedStaticRequest) (*controlv1.UnseedStaticResponse, error)
- func (s *Service) UnseedWorkload(_ context.Context, req *controlv1.UnseedWorkloadRequest) (*controlv1.UnseedWorkloadResponse, error)
- func (s *Service) UploadBlob(...) error
- type StateReader
- type StaticControl
- type TransportInfo
- type TunnelingControl
Constants ¶
View Source
const ControlTokenMetadataKey = "x-pln-token"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobsControl ¶
type MembershipControl ¶
type MeshConnector ¶
type MetricsSource ¶
type MetricsSource interface {
ControlMetrics() Metrics
}
type Option ¶
type Option func(*Service)
func WithCredentials ¶
func WithCredentials(c *auth.NodeCredentials) Option
func WithMeshConnector ¶
func WithMeshConnector(c MeshConnector) Option
func WithMetricsSource ¶
func WithMetricsSource(m MetricsSource) Option
func WithShutdown ¶
func WithShutdown(fn func()) Option
func WithTransportInfo ¶
func WithTransportInfo(t TransportInfo) Option
type PlacementControl ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(membership MembershipControl, placement PlacementControl, tunneling TunnelingControl, blobs BlobsControl, sc StaticControl, state StateReader, opts ...Option) *Server
type Service ¶
type Service struct {
controlv1.UnimplementedControlServiceServer
// contains filtered or unexported fields
}
func NewService ¶
func NewService(membership MembershipControl, placement PlacementControl, tunneling TunnelingControl, blobs BlobsControl, sc StaticControl, state StateReader, opts ...Option) *Service
func (*Service) CallWorkload ¶
func (s *Service) CallWorkload(ctx context.Context, req *controlv1.CallWorkloadRequest) (*controlv1.CallWorkloadResponse, error)
func (*Service) ConnectPeer ¶
func (s *Service) ConnectPeer(ctx context.Context, req *controlv1.ConnectPeerRequest) (*controlv1.ConnectPeerResponse, error)
func (*Service) ConnectService ¶
func (s *Service) ConnectService(ctx context.Context, req *controlv1.ConnectServiceRequest) (*controlv1.ConnectServiceResponse, error)
func (*Service) DenyPeer ¶
func (s *Service) DenyPeer(_ context.Context, req *controlv1.DenyPeerRequest) (*controlv1.DenyPeerResponse, error)
func (*Service) DisconnectService ¶
func (s *Service) DisconnectService(_ context.Context, req *controlv1.DisconnectServiceRequest) (*controlv1.DisconnectServiceResponse, error)
func (*Service) FetchBlob ¶
func (s *Service) FetchBlob(ctx context.Context, req *controlv1.FetchBlobRequest) (*controlv1.FetchBlobResponse, error)
func (*Service) GetBootstrapInfo ¶
func (s *Service) GetBootstrapInfo(_ context.Context, _ *controlv1.GetBootstrapInfoRequest) (*controlv1.GetBootstrapInfoResponse, error)
func (*Service) GetMetrics ¶
func (s *Service) GetMetrics(_ context.Context, _ *controlv1.GetMetricsRequest) (*controlv1.GetMetricsResponse, error)
func (*Service) GetStatus ¶
func (s *Service) GetStatus(_ context.Context, _ *controlv1.GetStatusRequest) (*controlv1.GetStatusResponse, error)
func (*Service) IssueCert ¶
func (s *Service) IssueCert(ctx context.Context, req *controlv1.IssueCertRequest) (*controlv1.IssueCertResponse, error)
func (*Service) ListStatic ¶
func (s *Service) ListStatic(_ context.Context, _ *controlv1.ListStaticRequest) (*controlv1.ListStaticResponse, error)
func (*Service) RegisterService ¶
func (s *Service) RegisterService(_ context.Context, req *controlv1.RegisterServiceRequest) (*controlv1.RegisterServiceResponse, error)
func (*Service) RemoveBlob ¶
func (s *Service) RemoveBlob(_ context.Context, req *controlv1.RemoveBlobRequest) (*controlv1.RemoveBlobResponse, error)
func (*Service) SeedStatic ¶
func (s *Service) SeedStatic(_ context.Context, req *controlv1.SeedStaticRequest) (*controlv1.SeedStaticResponse, error)
func (*Service) SeedWorkload ¶
func (s *Service) SeedWorkload(stream grpc.ClientStreamingServer[controlv1.SeedWorkloadRequest, controlv1.SeedWorkloadResponse]) error
func (*Service) Shutdown ¶
func (s *Service) Shutdown(_ context.Context, _ *controlv1.ShutdownRequest) (*controlv1.ShutdownResponse, error)
func (*Service) UnregisterService ¶
func (s *Service) UnregisterService(_ context.Context, req *controlv1.UnregisterServiceRequest) (*controlv1.UnregisterServiceResponse, error)
func (*Service) UnseedStatic ¶
func (s *Service) UnseedStatic(_ context.Context, req *controlv1.UnseedStaticRequest) (*controlv1.UnseedStaticResponse, error)
func (*Service) UnseedWorkload ¶
func (s *Service) UnseedWorkload(_ context.Context, req *controlv1.UnseedWorkloadRequest) (*controlv1.UnseedWorkloadResponse, error)
func (*Service) UploadBlob ¶
func (s *Service) UploadBlob(stream grpc.ClientStreamingServer[controlv1.UploadBlobRequest, controlv1.UploadBlobResponse]) error
type StateReader ¶
type StaticControl ¶
type TransportInfo ¶
type TunnelingControl ¶
type TunnelingControl interface {
Connect(ctx context.Context, peer types.PeerKey, remotePort, localPort uint32, protocol statev1.ServiceProtocol) (uint32, error)
Disconnect(service string) error
ExposeService(port uint32, name string, protocol statev1.ServiceProtocol, properties *structpb.Struct) error
UnexposeService(name string) error
ListConnections() []tunneling.ConnectionInfo
}
Click to show internal directories.
Click to hide internal directories.