playpb

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_playpb_playground_proto protoreflect.FileDescriptor
View Source
var PlaygroundApi_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "smartcore.playground.api.PlaygroundApi",
	HandlerType: (*PlaygroundApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddDeviceTrait",
			Handler:    _PlaygroundApi_AddDeviceTrait_Handler,
		},
		{
			MethodName: "ListSupportedTraits",
			Handler:    _PlaygroundApi_ListSupportedTraits_Handler,
		},
		{
			MethodName: "AddRemoteDevice",
			Handler:    _PlaygroundApi_AddRemoteDevice_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "PullPerformance",
			Handler:       _PlaygroundApi_PullPerformance_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pkg/playpb/playground.proto",
}

PlaygroundApi_ServiceDesc is the grpc.ServiceDesc for PlaygroundApi service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPlaygroundApiServer

func RegisterPlaygroundApiServer(s grpc.ServiceRegistrar, srv PlaygroundApiServer)

Types

type AddDeviceTraitRequest

type AddDeviceTraitRequest struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	TraitName string `protobuf:"bytes,2,opt,name=trait_name,json=traitName,proto3" json:"trait_name,omitempty"`
	// contains filtered or unexported fields
}

func (*AddDeviceTraitRequest) Descriptor deprecated

func (*AddDeviceTraitRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddDeviceTraitRequest.ProtoReflect.Descriptor instead.

func (*AddDeviceTraitRequest) GetName

func (x *AddDeviceTraitRequest) GetName() string

func (*AddDeviceTraitRequest) GetTraitName

func (x *AddDeviceTraitRequest) GetTraitName() string

func (*AddDeviceTraitRequest) ProtoMessage

func (*AddDeviceTraitRequest) ProtoMessage()

func (*AddDeviceTraitRequest) ProtoReflect

func (x *AddDeviceTraitRequest) ProtoReflect() protoreflect.Message

func (*AddDeviceTraitRequest) Reset

func (x *AddDeviceTraitRequest) Reset()

func (*AddDeviceTraitRequest) String

func (x *AddDeviceTraitRequest) String() string

type AddDeviceTraitResponse

type AddDeviceTraitResponse struct {
	// contains filtered or unexported fields
}

func (*AddDeviceTraitResponse) Descriptor deprecated

func (*AddDeviceTraitResponse) Descriptor() ([]byte, []int)

Deprecated: Use AddDeviceTraitResponse.ProtoReflect.Descriptor instead.

func (*AddDeviceTraitResponse) ProtoMessage

func (*AddDeviceTraitResponse) ProtoMessage()

func (*AddDeviceTraitResponse) ProtoReflect

func (x *AddDeviceTraitResponse) ProtoReflect() protoreflect.Message

func (*AddDeviceTraitResponse) Reset

func (x *AddDeviceTraitResponse) Reset()

func (*AddDeviceTraitResponse) String

func (x *AddDeviceTraitResponse) String() string

type AddRemoteDeviceRequest

type AddRemoteDeviceRequest struct {
	Name      string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Endpoint  string     `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	TraitName []string   `protobuf:"bytes,3,rep,name=trait_name,json=traitName,proto3" json:"trait_name,omitempty"`
	Tls       *RemoteTLS `protobuf:"bytes,4,opt,name=tls,proto3" json:"tls,omitempty"`
	Insecure  bool       `protobuf:"varint,5,opt,name=insecure,proto3" json:"insecure,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRemoteDeviceRequest) Descriptor deprecated

func (*AddRemoteDeviceRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddRemoteDeviceRequest.ProtoReflect.Descriptor instead.

func (*AddRemoteDeviceRequest) GetEndpoint

func (x *AddRemoteDeviceRequest) GetEndpoint() string

func (*AddRemoteDeviceRequest) GetInsecure

func (x *AddRemoteDeviceRequest) GetInsecure() bool

func (*AddRemoteDeviceRequest) GetName

func (x *AddRemoteDeviceRequest) GetName() string

func (*AddRemoteDeviceRequest) GetTls

func (x *AddRemoteDeviceRequest) GetTls() *RemoteTLS

func (*AddRemoteDeviceRequest) GetTraitName

func (x *AddRemoteDeviceRequest) GetTraitName() []string

func (*AddRemoteDeviceRequest) ProtoMessage

func (*AddRemoteDeviceRequest) ProtoMessage()

func (*AddRemoteDeviceRequest) ProtoReflect

func (x *AddRemoteDeviceRequest) ProtoReflect() protoreflect.Message

func (*AddRemoteDeviceRequest) Reset

func (x *AddRemoteDeviceRequest) Reset()

func (*AddRemoteDeviceRequest) String

func (x *AddRemoteDeviceRequest) String() string

type AddRemoteDeviceResponse

type AddRemoteDeviceResponse struct {
	// contains filtered or unexported fields
}

func (*AddRemoteDeviceResponse) Descriptor deprecated

func (*AddRemoteDeviceResponse) Descriptor() ([]byte, []int)

Deprecated: Use AddRemoteDeviceResponse.ProtoReflect.Descriptor instead.

func (*AddRemoteDeviceResponse) ProtoMessage

func (*AddRemoteDeviceResponse) ProtoMessage()

func (*AddRemoteDeviceResponse) ProtoReflect

func (x *AddRemoteDeviceResponse) ProtoReflect() protoreflect.Message

func (*AddRemoteDeviceResponse) Reset

func (x *AddRemoteDeviceResponse) Reset()

func (*AddRemoteDeviceResponse) String

func (x *AddRemoteDeviceResponse) String() string

type ListSupportedTraitsRequest

type ListSupportedTraitsRequest struct {
	// contains filtered or unexported fields
}

func (*ListSupportedTraitsRequest) Descriptor deprecated

func (*ListSupportedTraitsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListSupportedTraitsRequest.ProtoReflect.Descriptor instead.

func (*ListSupportedTraitsRequest) ProtoMessage

func (*ListSupportedTraitsRequest) ProtoMessage()

func (*ListSupportedTraitsRequest) ProtoReflect

func (*ListSupportedTraitsRequest) Reset

func (x *ListSupportedTraitsRequest) Reset()

func (*ListSupportedTraitsRequest) String

func (x *ListSupportedTraitsRequest) String() string

type ListSupportedTraitsResponse

type ListSupportedTraitsResponse struct {
	TraitName []string `protobuf:"bytes,1,rep,name=trait_name,json=traitName,proto3" json:"trait_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSupportedTraitsResponse) Descriptor deprecated

func (*ListSupportedTraitsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListSupportedTraitsResponse.ProtoReflect.Descriptor instead.

func (*ListSupportedTraitsResponse) GetTraitName

func (x *ListSupportedTraitsResponse) GetTraitName() []string

func (*ListSupportedTraitsResponse) ProtoMessage

func (*ListSupportedTraitsResponse) ProtoMessage()

func (*ListSupportedTraitsResponse) ProtoReflect

func (*ListSupportedTraitsResponse) Reset

func (x *ListSupportedTraitsResponse) Reset()

func (*ListSupportedTraitsResponse) String

func (x *ListSupportedTraitsResponse) String() string

type Performance

type Performance struct {
	Frame   *durationpb.Duration `protobuf:"bytes,1,opt,name=frame,proto3" json:"frame,omitempty"`
	Capture *durationpb.Duration `protobuf:"bytes,2,opt,name=capture,proto3" json:"capture,omitempty"`
	Scrub   *durationpb.Duration `protobuf:"bytes,3,opt,name=scrub,proto3" json:"scrub,omitempty"`
	Respond *durationpb.Duration `protobuf:"bytes,4,opt,name=respond,proto3" json:"respond,omitempty"`
	Idle    *durationpb.Duration `protobuf:"bytes,5,opt,name=idle,proto3" json:"idle,omitempty"`
	// contains filtered or unexported fields
}

func (*Performance) Descriptor deprecated

func (*Performance) Descriptor() ([]byte, []int)

Deprecated: Use Performance.ProtoReflect.Descriptor instead.

func (*Performance) GetCapture

func (x *Performance) GetCapture() *durationpb.Duration

func (*Performance) GetFrame

func (x *Performance) GetFrame() *durationpb.Duration

func (*Performance) GetIdle

func (x *Performance) GetIdle() *durationpb.Duration

func (*Performance) GetRespond

func (x *Performance) GetRespond() *durationpb.Duration

func (*Performance) GetScrub

func (x *Performance) GetScrub() *durationpb.Duration

func (*Performance) ProtoMessage

func (*Performance) ProtoMessage()

func (*Performance) ProtoReflect

func (x *Performance) ProtoReflect() protoreflect.Message

func (*Performance) Reset

func (x *Performance) Reset()

func (*Performance) String

func (x *Performance) String() string

type PlaygroundApiClient

type PlaygroundApiClient interface {
	AddDeviceTrait(ctx context.Context, in *AddDeviceTraitRequest, opts ...grpc.CallOption) (*AddDeviceTraitResponse, error)
	ListSupportedTraits(ctx context.Context, in *ListSupportedTraitsRequest, opts ...grpc.CallOption) (*ListSupportedTraitsResponse, error)
	AddRemoteDevice(ctx context.Context, in *AddRemoteDeviceRequest, opts ...grpc.CallOption) (*AddRemoteDeviceResponse, error)
	// PullPerformance returns the current performance metrics for the playground.
	PullPerformance(ctx context.Context, in *PullPerformanceRequest, opts ...grpc.CallOption) (PlaygroundApi_PullPerformanceClient, error)
}

PlaygroundApiClient is the client API for PlaygroundApi service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type PlaygroundApiServer

type PlaygroundApiServer interface {
	AddDeviceTrait(context.Context, *AddDeviceTraitRequest) (*AddDeviceTraitResponse, error)
	ListSupportedTraits(context.Context, *ListSupportedTraitsRequest) (*ListSupportedTraitsResponse, error)
	AddRemoteDevice(context.Context, *AddRemoteDeviceRequest) (*AddRemoteDeviceResponse, error)
	// PullPerformance returns the current performance metrics for the playground.
	PullPerformance(*PullPerformanceRequest, PlaygroundApi_PullPerformanceServer) error
	// contains filtered or unexported methods
}

PlaygroundApiServer is the server API for PlaygroundApi service. All implementations must embed UnimplementedPlaygroundApiServer for forward compatibility

type PlaygroundApi_PullPerformanceClient

type PlaygroundApi_PullPerformanceClient interface {
	Recv() (*PullPerformanceResponse, error)
	grpc.ClientStream
}

type PlaygroundApi_PullPerformanceServer

type PlaygroundApi_PullPerformanceServer interface {
	Send(*PullPerformanceResponse) error
	grpc.ServerStream
}

type PullPerformanceRequest

type PullPerformanceRequest struct {
	// contains filtered or unexported fields
}

func (*PullPerformanceRequest) Descriptor deprecated

func (*PullPerformanceRequest) Descriptor() ([]byte, []int)

Deprecated: Use PullPerformanceRequest.ProtoReflect.Descriptor instead.

func (*PullPerformanceRequest) ProtoMessage

func (*PullPerformanceRequest) ProtoMessage()

func (*PullPerformanceRequest) ProtoReflect

func (x *PullPerformanceRequest) ProtoReflect() protoreflect.Message

func (*PullPerformanceRequest) Reset

func (x *PullPerformanceRequest) Reset()

func (*PullPerformanceRequest) String

func (x *PullPerformanceRequest) String() string

type PullPerformanceResponse

type PullPerformanceResponse struct {
	Performance *Performance           `protobuf:"bytes,1,opt,name=performance,proto3" json:"performance,omitempty"`
	ChangeTime  *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=change_time,json=changeTime,proto3" json:"change_time,omitempty"`
	// contains filtered or unexported fields
}

func (*PullPerformanceResponse) Descriptor deprecated

func (*PullPerformanceResponse) Descriptor() ([]byte, []int)

Deprecated: Use PullPerformanceResponse.ProtoReflect.Descriptor instead.

func (*PullPerformanceResponse) GetChangeTime

func (x *PullPerformanceResponse) GetChangeTime() *timestamppb.Timestamp

func (*PullPerformanceResponse) GetPerformance

func (x *PullPerformanceResponse) GetPerformance() *Performance

func (*PullPerformanceResponse) ProtoMessage

func (*PullPerformanceResponse) ProtoMessage()

func (*PullPerformanceResponse) ProtoReflect

func (x *PullPerformanceResponse) ProtoReflect() protoreflect.Message

func (*PullPerformanceResponse) Reset

func (x *PullPerformanceResponse) Reset()

func (*PullPerformanceResponse) String

func (x *PullPerformanceResponse) String() string

type RemoteTLS

type RemoteTLS struct {
	ServerCaCert string `protobuf:"bytes,1,opt,name=server_ca_cert,json=serverCaCert,proto3" json:"server_ca_cert,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoteTLS) Descriptor deprecated

func (*RemoteTLS) Descriptor() ([]byte, []int)

Deprecated: Use RemoteTLS.ProtoReflect.Descriptor instead.

func (*RemoteTLS) GetServerCaCert

func (x *RemoteTLS) GetServerCaCert() string

func (*RemoteTLS) ProtoMessage

func (*RemoteTLS) ProtoMessage()

func (*RemoteTLS) ProtoReflect

func (x *RemoteTLS) ProtoReflect() protoreflect.Message

func (*RemoteTLS) Reset

func (x *RemoteTLS) Reset()

func (*RemoteTLS) String

func (x *RemoteTLS) String() string

type Server

type Server struct {
	UnimplementedPlaygroundApiServer
	// contains filtered or unexported fields
}

func New

func New(node *node.Node) *Server

func (*Server) AddDeviceTrait

func (s *Server) AddDeviceTrait(_ context.Context, request *AddDeviceTraitRequest) (*AddDeviceTraitResponse, error)

func (*Server) AddRemoteDevice

func (s *Server) AddRemoteDevice(ctx context.Context, req *AddRemoteDeviceRequest) (*AddRemoteDeviceResponse, error)

func (*Server) Frame

func (s *Server) Frame(f stats.FrameTiming)

func (*Server) PullPerformance

func (*Server) Register

func (s *Server) Register(server *grpc.Server)

type UnimplementedPlaygroundApiServer

type UnimplementedPlaygroundApiServer struct {
}

UnimplementedPlaygroundApiServer must be embedded to have forward compatible implementations.

func (UnimplementedPlaygroundApiServer) AddDeviceTrait

func (UnimplementedPlaygroundApiServer) AddRemoteDevice

type UnsafePlaygroundApiServer

type UnsafePlaygroundApiServer interface {
	// contains filtered or unexported methods
}

UnsafePlaygroundApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PlaygroundApiServer will result in compilation errors.

Jump to

Keyboard shortcuts

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