Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterActionsServer(s grpc.ServiceRegistrar, srv ActionsServer)
- type ActionsClient
- type ActionsServer
- type Guard
- func (*Guard) Descriptor() ([]byte, []int)deprecated
- func (x *Guard) GetAllowActions() []string
- func (x *Guard) GetAllowHosts() []string
- func (x *Guard) GetKeeps() map[string]*GuardKinds
- func (x *Guard) GetReadOnly() bool
- func (*Guard) ProtoMessage()
- func (x *Guard) ProtoReflect() protoreflect.Message
- func (x *Guard) Reset()
- func (x *Guard) String() string
- type GuardKinds
- type RunRequest
- func (*RunRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RunRequest) GetActions() map[string]string
- func (x *RunRequest) GetGuard() *Guard
- func (x *RunRequest) GetState() *structpb.Struct
- func (x *RunRequest) GetStep() *Step
- func (x *RunRequest) GetWith() *structpb.Struct
- func (*RunRequest) ProtoMessage()
- func (x *RunRequest) ProtoReflect() protoreflect.Message
- func (x *RunRequest) Reset()
- func (x *RunRequest) String() string
- type RunResponse
- func (*RunResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RunResponse) GetResult() *structpb.Struct
- func (x *RunResponse) GetState() *structpb.Struct
- func (*RunResponse) ProtoMessage()
- func (x *RunResponse) ProtoReflect() protoreflect.Message
- func (x *RunResponse) Reset()
- func (x *RunResponse) String() string
- type Step
- func (*Step) Descriptor() ([]byte, []int)deprecated
- func (x *Step) GetAttempt() int64
- func (x *Step) GetId() string
- func (x *Step) GetIndex() int64
- func (x *Step) GetJobId() string
- func (x *Step) GetJobName() string
- func (x *Step) GetName() string
- func (x *Step) GetRepeat() int64
- func (x *Step) GetRunId() string
- func (*Step) ProtoMessage()
- func (x *Step) ProtoReflect() protoreflect.Message
- func (x *Step) Reset()
- func (x *Step) String() string
- type UnimplementedActionsServer
- type UnsafeActionsServer
Constants ¶
const (
Actions_Run_FullMethodName = "/pb.Actions/Run"
)
Variables ¶
var Actions_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Actions", HandlerType: (*ActionsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Run", Handler: _Actions_Run_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/actions.proto", }
Actions_ServiceDesc is the grpc.ServiceDesc for Actions service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_pb_actions_proto protoreflect.FileDescriptor
Functions ¶
func RegisterActionsServer ¶
func RegisterActionsServer(s grpc.ServiceRegistrar, srv ActionsServer)
Types ¶
type ActionsClient ¶
type ActionsClient interface {
Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error)
}
ActionsClient is the client API for Actions 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 NewActionsClient ¶
func NewActionsClient(cc grpc.ClientConnInterface) ActionsClient
type ActionsServer ¶
type ActionsServer interface {
Run(context.Context, *RunRequest) (*RunResponse, error)
}
ActionsServer is the server API for Actions service. All implementations should embed UnimplementedActionsServer for forward compatibility
type Guard ¶
type Guard struct {
// Whether only what reads is allowed, and nothing that writes.
ReadOnly bool `protobuf:"varint,1,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
// The hosts actions may connect to, such as api.example.com,
// localhost:8080 or *.internal; empty for any.
AllowHosts []string `protobuf:"bytes,2,rep,name=allow_hosts,json=allowHosts,proto3" json:"allow_hosts,omitempty"`
// The actions run under the guard although they do not keep to it.
AllowActions []string `protobuf:"bytes,3,rep,name=allow_actions,json=allowActions,proto3" json:"allow_actions,omitempty"`
// The kinds of guard each action keeps to itself, such as read-only and
// allow-host, keyed by the action as a step's uses names it.
Keeps map[string]*GuardKinds `` /* 137-byte string literal not displayed */
// contains filtered or unexported fields
}
Guard is what the run allows actions to do, set by whoever runs probe rather than by the workflow. An action that keeps to it refuses what it does not allow; an empty guard allows everything.
func (*Guard) Descriptor
deprecated
func (*Guard) GetAllowActions ¶
func (*Guard) GetAllowHosts ¶
func (*Guard) GetKeeps ¶
func (x *Guard) GetKeeps() map[string]*GuardKinds
func (*Guard) GetReadOnly ¶
func (*Guard) ProtoMessage ¶
func (*Guard) ProtoMessage()
func (*Guard) ProtoReflect ¶
func (x *Guard) ProtoReflect() protoreflect.Message
type GuardKinds ¶
type GuardKinds struct {
Kinds []string `protobuf:"bytes,1,rep,name=kinds,proto3" json:"kinds,omitempty"`
// contains filtered or unexported fields
}
GuardKinds are the kinds of guard an action keeps to.
func (*GuardKinds) Descriptor
deprecated
func (*GuardKinds) Descriptor() ([]byte, []int)
Deprecated: Use GuardKinds.ProtoReflect.Descriptor instead.
func (*GuardKinds) GetKinds ¶
func (x *GuardKinds) GetKinds() []string
func (*GuardKinds) ProtoMessage ¶
func (*GuardKinds) ProtoMessage()
func (*GuardKinds) ProtoReflect ¶
func (x *GuardKinds) ProtoReflect() protoreflect.Message
func (*GuardKinds) Reset ¶
func (x *GuardKinds) Reset()
func (*GuardKinds) String ¶
func (x *GuardKinds) String() string
type RunRequest ¶
type RunRequest struct {
With *structpb.Struct `protobuf:"bytes,2,opt,name=with,proto3" json:"with,omitempty"`
// The state the action left in the job before, for a stateful action.
State *structpb.Struct `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
// The step the action runs for.
Step *Step `protobuf:"bytes,4,opt,name=step,proto3" json:"step,omitempty"`
// What the run allows the action to do, which the action keeps to.
Guard *Guard `protobuf:"bytes,5,opt,name=guard,proto3" json:"guard,omitempty"`
// The names the workflow gives its external actions, each with the action
// it stands for, for an action that runs steps of its own.
Actions map[string]string `` /* 141-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*RunRequest) Descriptor
deprecated
func (*RunRequest) Descriptor() ([]byte, []int)
Deprecated: Use RunRequest.ProtoReflect.Descriptor instead.
func (*RunRequest) GetActions ¶
func (x *RunRequest) GetActions() map[string]string
func (*RunRequest) GetGuard ¶
func (x *RunRequest) GetGuard() *Guard
func (*RunRequest) GetState ¶
func (x *RunRequest) GetState() *structpb.Struct
func (*RunRequest) GetStep ¶
func (x *RunRequest) GetStep() *Step
func (*RunRequest) GetWith ¶
func (x *RunRequest) GetWith() *structpb.Struct
func (*RunRequest) ProtoMessage ¶
func (*RunRequest) ProtoMessage()
func (*RunRequest) ProtoReflect ¶
func (x *RunRequest) ProtoReflect() protoreflect.Message
func (*RunRequest) Reset ¶
func (x *RunRequest) Reset()
func (*RunRequest) String ¶
func (x *RunRequest) String() string
type RunResponse ¶
type RunResponse struct {
Result *structpb.Struct `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
// The state the action leaves in the job, or none to keep it as it was.
State *structpb.Struct `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
// contains filtered or unexported fields
}
func (*RunResponse) Descriptor
deprecated
func (*RunResponse) Descriptor() ([]byte, []int)
Deprecated: Use RunResponse.ProtoReflect.Descriptor instead.
func (*RunResponse) GetResult ¶
func (x *RunResponse) GetResult() *structpb.Struct
func (*RunResponse) GetState ¶
func (x *RunResponse) GetState() *structpb.Struct
func (*RunResponse) ProtoMessage ¶
func (*RunResponse) ProtoMessage()
func (*RunResponse) ProtoReflect ¶
func (x *RunResponse) ProtoReflect() protoreflect.Message
func (*RunResponse) Reset ¶
func (x *RunResponse) Reset()
func (*RunResponse) String ¶
func (x *RunResponse) String() string
type Step ¶
type Step struct {
// The run of probe, the same for every step of every job in it.
RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
JobName string `protobuf:"bytes,3,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"`
// The position of the step in the job, from 0.
Index int64 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
// The id the step is given, or empty.
Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
// Which run of a repeated job, from 0.
Repeat int64 `protobuf:"varint,7,opt,name=repeat,proto3" json:"repeat,omitempty"`
// Which attempt of a retried step, from 1.
Attempt int64 `protobuf:"varint,8,opt,name=attempt,proto3" json:"attempt,omitempty"`
// contains filtered or unexported fields
}
Step tells an action about the step it runs for, for it to use as it sees fit, such as to say where a request comes from.
func (*Step) Descriptor
deprecated
func (*Step) GetAttempt ¶
func (*Step) GetJobName ¶
func (*Step) ProtoMessage ¶
func (*Step) ProtoMessage()
func (*Step) ProtoReflect ¶
func (x *Step) ProtoReflect() protoreflect.Message
type UnimplementedActionsServer ¶
type UnimplementedActionsServer struct {
}
UnimplementedActionsServer should be embedded to have forward compatible implementations.
func (UnimplementedActionsServer) Run ¶
func (UnimplementedActionsServer) Run(context.Context, *RunRequest) (*RunResponse, error)
type UnsafeActionsServer ¶
type UnsafeActionsServer interface {
// contains filtered or unexported methods
}
UnsafeActionsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ActionsServer will result in compilation errors.