Skip to content

Conversation

@wolfstudy
Copy link
Contributor

@wolfstudy wolfstudy commented Sep 3, 2019

Signed-off-by: xiaolong.ran ranxiaolong716@gmail.com

Master Issue: #2

Add delete cmd for Pulsar Functions, the output as follows:

USED FOR:
    This command is used for delete a Pulsar Function that is running on a Pulsar cluster.

REQUIRED PERMISSION:
    This command requires super-user permissions.

EXAMPLES:
    #Delete a Pulsar Function that is running on a Pulsar cluster
    pulsarctl functions create
	--tenant public
	--namespace default
	--name <the name of Pulsar Functions>

    #Delete a Pulsar Function that is running on a Pulsar cluster with instance ID
    pulsarctl functions create
	--tenant public
	--namespace default
	--name <the name of Pulsar Functions>
	--instance-id 1

    #Delete a Pulsar Function that is running on a Pulsar cluster with FQFN
    pulsarctl functions delete
	--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

OUTPUT:
    #normal output
    Deleted successfully

Usage: pulsarctl functions delete [flags]

Aliases: delete, delete

FunctionsConfig flags:
      --fqfn string        The Fully Qualified Function Name (FQFN) for the function
      --tenant string      The tenant of a Pulsar Function
      --namespace string   The namespace of a Pulsar Function
      --name string        The name of a Pulsar Function

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
@wolfstudy
Copy link
Contributor Author

@sijie @zymap PTAL

Out: "Deleted successfully",
}

out = append(out, successOut)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a few error cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OUTPUT:
    # normal output
    Deleted successfully

    # You must specify a name for the Pulsar Functions or a FQFN, please check the --name args
    [✖]  you must specify a name for the function or a Fully Qualified Function Name (FQFN)

    # The name of Pulsar Functions doesn't exist, please check the --name args
    [✖]  code: 404 reason: Function <your function name> doesn't exist

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
@sijie sijie added this to the 0.0.1 milestone Sep 3, 2019
@sijie sijie merged commit bb55a08 into master Sep 3, 2019
@sijie sijie deleted the xiaolong/delete-pulsar-functions branch September 3, 2019 19:07
@sijie sijie mentioned this pull request Sep 4, 2019
29 tasks
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>

Master Issue: streamnative/pulsarctl#2 

Add delete cmd for Pulsar Functions, the output as follows:

```
USED FOR:
    This command is used for delete a Pulsar Function that is running on a Pulsar cluster.

REQUIRED PERMISSION:
    This command requires super-user permissions.

EXAMPLES:
    #Delete a Pulsar Function that is running on a Pulsar cluster
    pulsarctl functions create
	--tenant public
	--namespace default
	--name <the name of Pulsar Functions>

    #Delete a Pulsar Function that is running on a Pulsar cluster with instance ID
    pulsarctl functions create
	--tenant public
	--namespace default
	--name <the name of Pulsar Functions>
	--instance-id 1

    #Delete a Pulsar Function that is running on a Pulsar cluster with FQFN
    pulsarctl functions delete
	--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

OUTPUT:
    #normal output
    Deleted successfully

Usage: pulsarctl functions delete [flags]

Aliases: delete, delete

FunctionsConfig flags:
      --fqfn string        The Fully Qualified Function Name (FQFN) for the function
      --tenant string      The tenant of a Pulsar Function
      --namespace string   The namespace of a Pulsar Function
      --name string        The name of a Pulsar Function
```
tisonkun pushed a commit to apache/pulsar-client-go that referenced this pull request Aug 16, 2023
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>

Master Issue: streamnative/pulsarctl#2 

Add delete cmd for Pulsar Functions, the output as follows:

```
USED FOR:
    This command is used for delete a Pulsar Function that is running on a Pulsar cluster.

REQUIRED PERMISSION:
    This command requires super-user permissions.

EXAMPLES:
    #Delete a Pulsar Function that is running on a Pulsar cluster
    pulsarctl functions create
	--tenant public
	--namespace default
	--name <the name of Pulsar Functions>

    #Delete a Pulsar Function that is running on a Pulsar cluster with instance ID
    pulsarctl functions create
	--tenant public
	--namespace default
	--name <the name of Pulsar Functions>
	--instance-id 1

    #Delete a Pulsar Function that is running on a Pulsar cluster with FQFN
    pulsarctl functions delete
	--fqfn tenant/namespace/name [eg: public/default/ExampleFunctions]

OUTPUT:
    #normal output
    Deleted successfully

Usage: pulsarctl functions delete [flags]

Aliases: delete, delete

FunctionsConfig flags:
      --fqfn string        The Fully Qualified Function Name (FQFN) for the function
      --tenant string      The tenant of a Pulsar Function
      --namespace string   The namespace of a Pulsar Function
      --name string        The name of a Pulsar Function
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants