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)
- func RegisterStateServer(s grpc.ServiceRegistrar, srv StateServer)
- 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 StateClient
- type StateClientProxy
- type StateServer
- type UnimplementedLoggingServer
- type UnimplementedStateServer
- type UnsafeLoggingServer
- type UnsafeStateServer
- type VerbosityReply
- type VersionManyResponse
- type VersionResponse
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)
var State_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Sansshell.State", HandlerType: (*StateServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _State_Version_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sansshell.proto", }
State_ServiceDesc is the grpc.ServiceDesc for State 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)
func RegisterStateServer ¶ added in v1.4.0
func RegisterStateServer(s grpc.ServiceRegistrar, srv StateServer)
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 StateClient ¶ added in v1.4.0
type StateClient interface { // Version will return the build version as embedded in the running // server.option Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) }
StateClient is the client API for State 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 NewStateClient ¶ added in v1.4.0
func NewStateClient(cc grpc.ClientConnInterface) StateClient
type StateClientProxy ¶ added in v1.4.0
type StateClientProxy interface { StateClient VersionOneMany(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (<-chan *VersionManyResponse, error) }
StateClientProxy is the superset of StateClient which additionally includes the OneMany proxy methods
func NewStateClientProxy ¶ added in v1.4.0
func NewStateClientProxy(cc *proxy.Conn) StateClientProxy
NewStateClientProxy creates a StateClientProxy 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 StateServer ¶ added in v1.4.0
type StateServer interface { // Version will return the build version as embedded in the running // server.option Version(context.Context, *emptypb.Empty) (*VersionResponse, error) }
StateServer is the server API for State service. All implementations should embed UnimplementedStateServer for forward compatibility
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 UnimplementedStateServer ¶ added in v1.4.0
type UnimplementedStateServer struct { }
UnimplementedStateServer should be embedded to have forward compatible implementations.
func (UnimplementedStateServer) Version ¶ added in v1.4.0
func (UnimplementedStateServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, 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 UnsafeStateServer ¶ added in v1.4.0
type UnsafeStateServer interface {
// contains filtered or unexported methods
}
UnsafeStateServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StateServer 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
type VersionManyResponse ¶ added in v1.4.0
type VersionManyResponse struct { Target string // As targets can be duplicated this is the index into the slice passed to proxy.Conn. Index int Resp *VersionResponse Error error }
VersionManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.
type VersionResponse ¶ added in v1.4.0
type VersionResponse struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
func (*VersionResponse) Descriptor
deprecated
added in
v1.4.0
func (*VersionResponse) Descriptor() ([]byte, []int)
Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
func (*VersionResponse) GetVersion ¶ added in v1.4.0
func (x *VersionResponse) GetVersion() string
func (*VersionResponse) ProtoMessage ¶ added in v1.4.0
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) ProtoReflect ¶ added in v1.4.0
func (x *VersionResponse) ProtoReflect() protoreflect.Message
func (*VersionResponse) Reset ¶ added in v1.4.0
func (x *VersionResponse) Reset()
func (*VersionResponse) String ¶ added in v1.4.0
func (x *VersionResponse) String() string