Documentation ¶
Index ¶
- Variables
- func ConfigureOpenIdIssuer(issuerUrl string) (*http.Server, error)
- func StartEmulator(ctx context.Context, opts EmulatorOptions) (string, error)
- type EmulatorOptions
- type OpenIDConnectClaims
- type Queue
- type Server
- func (s *Server) CreateQueue(ctx context.Context, in *tasks.CreateQueueRequest) (*tasks.Queue, error)
- func (s *Server) CreateTask(ctx context.Context, in *tasks.CreateTaskRequest) (*tasks.Task, error)
- func (s *Server) DeleteQueue(ctx context.Context, in *tasks.DeleteQueueRequest) (*empty.Empty, error)
- func (s *Server) DeleteTask(ctx context.Context, in *tasks.DeleteTaskRequest) (*empty.Empty, error)
- func (s *Server) GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest) (*v1.Policy, error)
- func (s *Server) GetQueue(ctx context.Context, in *tasks.GetQueueRequest) (*tasks.Queue, error)
- func (s *Server) GetTask(ctx context.Context, in *tasks.GetTaskRequest) (*tasks.Task, error)
- func (s *Server) ListQueues(ctx context.Context, in *tasks.ListQueuesRequest) (*tasks.ListQueuesResponse, error)
- func (s *Server) ListTasks(ctx context.Context, in *tasks.ListTasksRequest) (*tasks.ListTasksResponse, error)
- func (s *Server) PauseQueue(ctx context.Context, in *tasks.PauseQueueRequest) (*tasks.Queue, error)
- func (s *Server) PurgeQueue(ctx context.Context, in *tasks.PurgeQueueRequest) (*tasks.Queue, error)
- func (s *Server) ResumeQueue(ctx context.Context, in *tasks.ResumeQueueRequest) (*tasks.Queue, error)
- func (s *Server) RunTask(ctx context.Context, in *tasks.RunTaskRequest) (*tasks.Task, error)
- func (s *Server) SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest) (*v1.Policy, error)
- func (s *Server) TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error)
- func (s *Server) UpdateQueue(ctx context.Context, in *tasks.UpdateQueueRequest) (*tasks.Queue, error)
- type ServerOptions
- type Task
- type TaskNameParts
Constants ¶
This section is empty.
Variables ¶
var OpenIDConfig struct { IssuerURL string KeyID string PrivateKey *rsa.PrivateKey }
Functions ¶
func StartEmulator ¶
func StartEmulator(ctx context.Context, opts EmulatorOptions) (string, error)
Types ¶
type EmulatorOptions ¶
type OpenIDConnectClaims ¶
type OpenIDConnectClaims struct { Email string `json:"email"` EmailVerified bool `json:"email_verified"` jwt.StandardClaims }
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue holds all internals for a task queue
func (*Queue) HardReset ¶
Goes beyond `Purge` behaviour to synchronously delete all tasks and their name handles
type Server ¶
type Server struct { Options ServerOptions // contains filtered or unexported fields }
Server represents the emulator server
func NewServer ¶
func NewServer() *Server
NewServer creates a new emulator server with its own task and queue bookkeeping
func (*Server) CreateQueue ¶
func (s *Server) CreateQueue(ctx context.Context, in *tasks.CreateQueueRequest) (*tasks.Queue, error)
CreateQueue creates a new queue
func (*Server) CreateTask ¶
CreateTask creates a new task
func (*Server) DeleteQueue ¶
func (s *Server) DeleteQueue(ctx context.Context, in *tasks.DeleteQueueRequest) (*empty.Empty, error)
DeleteQueue removes an existing queue.
func (*Server) DeleteTask ¶
DeleteTask removes an existing task
func (*Server) GetIamPolicy ¶
GetIamPolicy doesn't do anything
func (*Server) ListQueues ¶
func (s *Server) ListQueues(ctx context.Context, in *tasks.ListQueuesRequest) (*tasks.ListQueuesResponse, error)
ListQueues lists the existing queues
func (*Server) ListTasks ¶
func (s *Server) ListTasks(ctx context.Context, in *tasks.ListTasksRequest) (*tasks.ListTasksResponse, error)
ListTasks lists the tasks in the specified queue
func (*Server) PauseQueue ¶
PauseQueue pauses queue execution
func (*Server) PurgeQueue ¶
PurgeQueue purges the specified queue
func (*Server) ResumeQueue ¶
func (s *Server) ResumeQueue(ctx context.Context, in *tasks.ResumeQueueRequest) (*tasks.Queue, error)
ResumeQueue resumes a paused queue
func (*Server) SetIamPolicy ¶
SetIamPolicy doesn't do anything
func (*Server) TestIamPermissions ¶
func (s *Server) TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error)
TestIamPermissions doesn't do anything
func (*Server) UpdateQueue ¶
func (s *Server) UpdateQueue(ctx context.Context, in *tasks.UpdateQueueRequest) (*tasks.Queue, error)
UpdateQueue updates an existing queue (not implemented yet)
type ServerOptions ¶
type ServerOptions struct {
HardResetOnPurgeQueue bool
}
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task holds all internals for a task
func (*Task) Delete ¶
func (task *Task) Delete()
Delete cancels the task if it is queued for execution. This method is called directly by request.
type TaskNameParts ¶
type TaskNameParts struct {
// contains filtered or unexported fields
}