Documentation ¶
Index ¶
- Constants
- Variables
- func Feather(encryptPass string, encryptSalt string, hostAddr string, handshakeCode string, ...)
- func FeatherCtlEmit(featherCtx *FeatherContext, modeCtlPack string, pense string, bypass bool) (string, error)
- func FeatherCtlEmitBinary(featherCtx *FeatherContext, modeCtlPack string, pense []byte, bypass bool) ([]byte, error)
- func FeatherWriter(featherCtx *FeatherContext, pense string) ([]byte, error)
- func PluckCtlEmit(featherCtx *FeatherContext, pense []byte) (bool, error)
- func RegisterCapServer(s grpc.ServiceRegistrar, srv CapServer)
- func TapFeather(penseIndex string, memory *string)
- func TapInitCodeSaltGuard(csgFn CodeSaltGuardFunc)
- func TapMemorize(penseIndex string, memory *string)
- func TapServer(address string, opt ...grpc.ServerOption)
- type CapClient
- type CapServer
- type CodeSaltGuardFunc
- type FeatherContext
- type PenseReply
- type PenseRequest
- func (*PenseRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PenseRequest) GetPense() string
- func (x *PenseRequest) GetPenseIndex() string
- func (*PenseRequest) ProtoMessage()
- func (x *PenseRequest) ProtoReflect() protoreflect.Message
- func (x *PenseRequest) Reset()
- func (x *PenseRequest) String() string
- type UnimplementedCapServer
- type UnsafeCapServer
Constants ¶
const ( FEATHER_COMMON = 1 << iota // COMMON FEATHER_CTL = 1 << iota // CTL 2 FEATHER_SECRET = 1 << iota // SECRET 4 )
const ( RUN_STARTED = 1 << iota // RUN_STARTED RUNNING = 1 << iota // RUNNING 2 RESETTING = 1 << iota // RESETTING 4 )
Variables ¶
var ( MODE_PERCH byte = 'c' MOID_VOID byte = 'v' MODE_PLUCK byte = 'k' MODE_FLAP byte = 'p' MODE_GLIDE byte = 'g' MODE_GAZE byte = 'z' PROTOCOL_DELIM byte = ':' )
var ( CTL_COMPLETE string = "CTLCOMPLETE" CTL_COMPLETE_BYTES []byte = []byte(CTL_COMPLETE) PROTOCOL_HDR string = "featherctl" PROTOCOL_HDR_BYTES []byte = []byte(PROTOCOL_HDR) MODE_FLAP_BYTES []byte = []byte{MODE_FLAP} MODE_GLIDE_BYTES []byte = []byte{MODE_GLIDE} )
var Cap_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cap.Cap", HandlerType: (*CapServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Pense", Handler: _Cap_Pense_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cap/cap.proto", }
Cap_ServiceDesc is the grpc.ServiceDesc for Cap service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cap_cap_proto protoreflect.FileDescriptor
Functions ¶
func FeatherCtlEmit ¶
func FeatherCtlEmitBinary ¶
func FeatherWriter ¶
func FeatherWriter(featherCtx *FeatherContext, pense string) ([]byte, error)
func PluckCtlEmit ¶
func PluckCtlEmit(featherCtx *FeatherContext, pense []byte) (bool, error)
Pluck is a blocking call
func RegisterCapServer ¶
func RegisterCapServer(s grpc.ServiceRegistrar, srv CapServer)
func TapFeather ¶
func TapInitCodeSaltGuard ¶ added in v1.2.0
func TapInitCodeSaltGuard(csgFn CodeSaltGuardFunc)
func TapMemorize ¶
func TapServer ¶
func TapServer(address string, opt ...grpc.ServerOption)
Types ¶
type CapClient ¶
type CapClient interface {
Pense(ctx context.Context, in *PenseRequest, opts ...grpc.CallOption) (*PenseReply, error)
}
CapClient is the client API for Cap 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 NewCapClient ¶
func NewCapClient(cc grpc.ClientConnInterface) CapClient
type CapServer ¶
type CapServer interface { Pense(context.Context, *PenseRequest) (*PenseReply, error) // contains filtered or unexported methods }
CapServer is the server API for Cap service. All implementations must embed UnimplementedCapServer for forward compatibility
type CodeSaltGuardFunc ¶ added in v1.2.1
type CodeSaltGuardFunc func() string
CodeSaltGuardFn is expected to return a hex.EncodeToString encoded salt
var CodeSaltGuardFn CodeSaltGuardFunc = nil
type FeatherContext ¶
type FeatherContext struct { EncryptPass *string EncryptSalt *string LocalHostAddr *string HostAddr *string HandshakeCode *string SessionIdentifier *string Env *string AcceptRemoteFunc func(*FeatherContext, int, string) (bool, error) InterruptHandlerFunc func(*FeatherContext) error InterruptChan chan os.Signal RunState int64 // whether to restart a run TwoHundredMilliInterruptTicker *time.Ticker MultiSecondInterruptTicker *time.Ticker FifteenSecondInterruptTicker *time.Ticker ThirtySecondInterruptTicker *time.Ticker Log *log.Logger }
type PenseReply ¶
type PenseReply struct { Pense string `protobuf:"bytes,1,opt,name=pense,proto3" json:"pense,omitempty"` // contains filtered or unexported fields }
func (*PenseReply) Descriptor
deprecated
func (*PenseReply) Descriptor() ([]byte, []int)
Deprecated: Use PenseReply.ProtoReflect.Descriptor instead.
func (*PenseReply) GetPense ¶
func (x *PenseReply) GetPense() string
func (*PenseReply) ProtoMessage ¶
func (*PenseReply) ProtoMessage()
func (*PenseReply) ProtoReflect ¶
func (x *PenseReply) ProtoReflect() protoreflect.Message
func (*PenseReply) Reset ¶
func (x *PenseReply) Reset()
func (*PenseReply) String ¶
func (x *PenseReply) String() string
type PenseRequest ¶
type PenseRequest struct { Pense string `protobuf:"bytes,1,opt,name=pense,proto3" json:"pense,omitempty"` PenseIndex string `protobuf:"bytes,2,opt,name=penseIndex,proto3" json:"penseIndex,omitempty"` // contains filtered or unexported fields }
func (*PenseRequest) Descriptor
deprecated
func (*PenseRequest) Descriptor() ([]byte, []int)
Deprecated: Use PenseRequest.ProtoReflect.Descriptor instead.
func (*PenseRequest) GetPense ¶
func (x *PenseRequest) GetPense() string
func (*PenseRequest) GetPenseIndex ¶
func (x *PenseRequest) GetPenseIndex() string
func (*PenseRequest) ProtoMessage ¶
func (*PenseRequest) ProtoMessage()
func (*PenseRequest) ProtoReflect ¶
func (x *PenseRequest) ProtoReflect() protoreflect.Message
func (*PenseRequest) Reset ¶
func (x *PenseRequest) Reset()
func (*PenseRequest) String ¶
func (x *PenseRequest) String() string
type UnimplementedCapServer ¶
type UnimplementedCapServer struct { }
UnimplementedCapServer must be embedded to have forward compatible implementations.
func (UnimplementedCapServer) Pense ¶
func (UnimplementedCapServer) Pense(context.Context, *PenseRequest) (*PenseReply, error)
type UnsafeCapServer ¶
type UnsafeCapServer interface {
// contains filtered or unexported methods
}
UnsafeCapServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CapServer will result in compilation errors.