cap

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FEATHER_COMMON = 1 << iota // COMMON
	FEATHER_CTL    = 1 << iota // CTL 2
	FEATHER_SECRET = 1 << iota // SECRET 4
)
View Source
const (
	RUN_STARTED = 1 << iota // RUN_STARTED
	RUNNING     = 1 << iota // RUNNING 2
	RESETTING   = 1 << iota // RESETTING 4
)

Variables

View Source
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 = ':'
)
View Source
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}
)
View Source
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)

View Source
var File_cap_cap_proto protoreflect.FileDescriptor

Functions

func Feather

func Feather(encryptPass string, encryptSalt string, hostAddr string, handshakeCode string, acceptRemote func(int, string) bool)

func FeatherCtlEmit

func FeatherCtlEmit(featherCtx *FeatherContext, modeCtlPack string, pense string, bypass bool) (string, error)

func FeatherCtlEmitBinary

func FeatherCtlEmitBinary(featherCtx *FeatherContext, modeCtlPack string, pense []byte, bypass bool) ([]byte, error)

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 TapFeather(penseIndex, memory string)

func TapMemorize

func TapMemorize(penseIndex, memory string)

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 FeatherContext

type FeatherContext struct {
	EncryptPass                    *string
	EncryptSalt                    *string
	LocalHostAddr                  *string
	HostAddr                       *string
	HandshakeCode                  *string
	SessionIdentifier              *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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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