etcdctl/ctlv3/command/util.go
func compact(c *v3.Client, rev int64) {
	fmt.Printf("Compacting with revision %d\n", rev)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	_, err := c.Compact(ctx, rev, v3.WithCompactPhysical())
	cancel()
	if err != nil {
		ExitWithError(ExitError, err)
	}
	fmt.Printf("Compacted with revision %d\n", rev)
}
func compact(c *v3.Client, rev int64) {
	fmt.Printf("Compacting with revision %d\n", rev)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	_, err := c.Compact(ctx, rev, v3.WithCompactPhysical())
	cancel()
	if err != nil {
		ExitWithError(ExitError, err)
	}
	fmt.Printf("Compacted with revision %d\n", rev)
}
func compact ( c * v3 . Client , rev int64 ) { fmt . Printf ( " \n " , rev ) ctx , cancel := context . WithTimeout ( context . Background ( ) , 30 * time . Second ) _ , err := c . Compact ( ctx , rev , v3 . WithCompactPhysical ( ) ) cancel ( ) if err != nil { ExitWithError ( ExitError , err ) } fmt . Printf ( " \n " , rev ) }
// compact keyspace history to a provided revision
compact keyspace history to a provided revision