Documentation ¶
Overview ¶
Package sansshell defines the RPC interface for internal Sansshell operations. This differs from other sansshell services as it is only changing internal state and not otherwise interacting with the host OS.
Index ¶
- Variables
- func RegisterLoggingServer(s grpc.ServiceRegistrar, srv LoggingServer)
- type GetVerbosityManyResponse
- type LoggingClient
- type LoggingClientProxy
- type LoggingServer
- type SetVerbosityManyResponse
- type SetVerbosityRequest
- func (*SetVerbosityRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetVerbosityRequest) GetLevel() int32
- func (*SetVerbosityRequest) ProtoMessage()
- func (x *SetVerbosityRequest) ProtoReflect() protoreflect.Message
- func (x *SetVerbosityRequest) Reset()
- func (x *SetVerbosityRequest) String() string
- type UnimplementedLoggingServer
- type UnsafeLoggingServer
- type VerbosityReply
Constants ¶
This section is empty.
Variables ¶
var File_sansshell_proto protoreflect.FileDescriptor
var Logging_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Sansshell.Logging", HandlerType: (*LoggingServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetVerbosity", Handler: _Logging_SetVerbosity_Handler, }, { MethodName: "GetVerbosity", Handler: _Logging_GetVerbosity_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sansshell.proto", }
Logging_ServiceDesc is the grpc.ServiceDesc for Logging service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLoggingServer ¶
func RegisterLoggingServer(s grpc.ServiceRegistrar, srv LoggingServer)
Types ¶
type GetVerbosityManyResponse ¶
type GetVerbosityManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *VerbosityReply Error error }
GetVerbosityManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type LoggingClient ¶
type LoggingClient interface { // SetVerbosity will change the logging level of the stdr logger package. // This can be called concurrently with no guarentees on ordering so the // final level set is the last RPC processed. This will return the previous // verbosity setting that was in effect before setting. SetVerbosity(ctx context.Context, in *SetVerbosityRequest, opts ...grpc.CallOption) (*VerbosityReply, error) // GetVerbosity returns the latest verbosity level based on the most // recently processed SetVerbosity RPC. GetVerbosity(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VerbosityReply, error) }
LoggingClient is the client API for Logging 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.
func NewLoggingClient ¶
func NewLoggingClient(cc grpc.ClientConnInterface) LoggingClient
type LoggingClientProxy ¶
type LoggingClientProxy interface { LoggingClient SetVerbosityOneMany(ctx context.Context, in *SetVerbosityRequest, opts ...grpc.CallOption) (<-chan *SetVerbosityManyResponse, error) GetVerbosityOneMany(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (<-chan *GetVerbosityManyResponse, error) }
LoggingClientProxy is the superset of LoggingClient which additionally includes the OneMany proxy methods
func NewLoggingClientProxy ¶
func NewLoggingClientProxy(cc *proxy.Conn) LoggingClientProxy
NewLoggingClientProxy creates a LoggingClientProxy for use in proxied connections. NOTE: This takes a proxy.Conn instead of a generic ClientConnInterface as the methods here are only valid in proxy.Conn contexts.
type LoggingServer ¶
type LoggingServer interface { // SetVerbosity will change the logging level of the stdr logger package. // This can be called concurrently with no guarentees on ordering so the // final level set is the last RPC processed. This will return the previous // verbosity setting that was in effect before setting. SetVerbosity(context.Context, *SetVerbosityRequest) (*VerbosityReply, error) // GetVerbosity returns the latest verbosity level based on the most // recently processed SetVerbosity RPC. GetVerbosity(context.Context, *emptypb.Empty) (*VerbosityReply, error) }
LoggingServer is the server API for Logging service. All implementations should embed UnimplementedLoggingServer for forward compatibility
type SetVerbosityManyResponse ¶
type SetVerbosityManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *VerbosityReply Error error }
SetVerbosityManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type SetVerbosityRequest ¶
type SetVerbosityRequest struct { Level int32 `protobuf:"varint,1,opt,name=Level,proto3" json:"Level,omitempty"` // contains filtered or unexported fields }
func (*SetVerbosityRequest) Descriptor
deprecated
func (*SetVerbosityRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetVerbosityRequest.ProtoReflect.Descriptor instead.
func (*SetVerbosityRequest) GetLevel ¶
func (x *SetVerbosityRequest) GetLevel() int32
func (*SetVerbosityRequest) ProtoMessage ¶
func (*SetVerbosityRequest) ProtoMessage()
func (*SetVerbosityRequest) ProtoReflect ¶
func (x *SetVerbosityRequest) ProtoReflect() protoreflect.Message
func (*SetVerbosityRequest) Reset ¶
func (x *SetVerbosityRequest) Reset()
func (*SetVerbosityRequest) String ¶
func (x *SetVerbosityRequest) String() string
type UnimplementedLoggingServer ¶
type UnimplementedLoggingServer struct { }
UnimplementedLoggingServer should be embedded to have forward compatible implementations.
func (UnimplementedLoggingServer) GetVerbosity ¶
func (UnimplementedLoggingServer) GetVerbosity(context.Context, *emptypb.Empty) (*VerbosityReply, error)
func (UnimplementedLoggingServer) SetVerbosity ¶
func (UnimplementedLoggingServer) SetVerbosity(context.Context, *SetVerbosityRequest) (*VerbosityReply, error)
type UnsafeLoggingServer ¶
type UnsafeLoggingServer interface {
// contains filtered or unexported methods
}
UnsafeLoggingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoggingServer will result in compilation errors.
type VerbosityReply ¶
type VerbosityReply struct { Level int32 `protobuf:"varint,1,opt,name=Level,proto3" json:"Level,omitempty"` // contains filtered or unexported fields }
func (*VerbosityReply) Descriptor
deprecated
func (*VerbosityReply) Descriptor() ([]byte, []int)
Deprecated: Use VerbosityReply.ProtoReflect.Descriptor instead.
func (*VerbosityReply) GetLevel ¶
func (x *VerbosityReply) GetLevel() int32
func (*VerbosityReply) ProtoMessage ¶
func (*VerbosityReply) ProtoMessage()
func (*VerbosityReply) ProtoReflect ¶
func (x *VerbosityReply) ProtoReflect() protoreflect.Message
func (*VerbosityReply) Reset ¶
func (x *VerbosityReply) Reset()
func (*VerbosityReply) String ¶
func (x *VerbosityReply) String() string